Implement std::fmt::Display for all OSC types #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement the
std::fmt::Display
trait forOscPacket
,OscType
, and related types. This is to facilitate cleaner log output in consuming projects.OscType
Message argument values are prepended by the appropriate type tag as defined in the OSC 1.0 spec.
OscType::Int
(i) 123
OscType::Float
(f) 123.4
OscType::String
(s) abc
OscType::Blob
(b) 0x000102FF
OscType::Time
(t) 1970-01-01T00:00:00.000000000Z
OscType::Long
(h) 123
OscType::Double
(d) 123.4
OscType::Char
(c) a
OscType::Color
(r) {255,127,63,255}
OscType::Midi
(m) {port:3, status:0xF0, data:0x1234}
OscType::Bool
(T)
or(F)
OscType::Array
[(i) 123,(f) 123.4,(s) abc]
OscType::Nil
(N)
OscType::Inf
(I)
OscPacket (Message)
/oscillator/1/frequency, (f) 123.4, (T)
OscPacket (Bundle)
#bundle 1970-01-01T00:00:00.000000000Z { /oscillator/1/frequency, (f) 123.4, (T); /oscillator/2/frequency, (f) 246.8, (F); #bundle 1970-01-01T00:00:00.000000000Z { /oscillator/3/frequency, (f) 123.4, (T) } }