Crate osc_address [] [src]

This crate defines some utilities for dealing with Open Sound Control (OSC) messages. It is intended to be paired with osc_address_derive and provides a layer of abstraction over serde_osc, but usage of either is optional and serialization/deserialization works with any serde backend.

The primary feature of this crate is its OscMessage trait, which provides a type-safe way of encoding an OSC address and its payload while serializing/deserializating as if it were a generic (osc_address: String, msg_payload: (...)) type suitable for serde_osc.

The OscMessage trait is intended to be implemented automatically via a #[derive(OscMessage)] directive, by use of osc_address_derive. Because of this, that crate hosts usage examples, whereas this crate hosts only the API documentation.

Structs

AbsOscTime

OSC uses ntp time, i.e. absolute # of seconds since 1970 + a fraction of a second.

OscBundle

An OSC bundle consists of 0 or more OSC packets that are to be handled atomically. Each packet is itself a message or another bundle. The bundle also contains a time tag indicating when it should be handled.

Enums

OscPacket

An OSC packet represents either a single OSC message, or a bundle with an associated time of zero or more OSC packets.

OscTime

Time tag assigned to each OscBundle.

Traits

OscMessage

Type that exposes an OSC address and a message payload. Can be deserialized and serialized as if it were a (String, ([payload_arguments, ...])) sequence.