tuioxide 0.3.1

A Rust implementation of the TUIO 1.1 and TUIO 2.0 protocols, providing both client and server components for sending and receiving multitouch and tangible object data over OSC.
Documentation
use rosc::OscPacket;

/// Trait representing a TUIO profile — a typed, addressable OSC entity
/// (e.g. a cursor, object, blob, pointer, token, symbol, or bounds).
///
/// Each profile type maps to a specific OSC address (e.g. `/tuio/2Dcur`)
/// and can be converted into an [`OscPacket`] for transmission.
pub trait Profile: Into<OscPacket> {
    /// Returns the session ID of this profile instance.
    ///
    /// Session IDs are assigned by the TUIO source and uniquely identify
    /// an active entity within a session.
    fn session_id(&self) -> i32;

    /// Returns the OSC address string for this profile type.
    ///
    /// For example, the 2D cursor profile returns `"/tuio/2Dcur"` and
    /// the TUIO 2.0 pointer profile returns `"/tuio2/ptr"`.
    fn address() -> String;
}