Struct natnet_decode::NatNet
[−]
[src]
pub struct NatNet { /* fields omitted */ }
Parser for NatNet
data
This is the main entry point to unpack/parse NatNet
data.
Methods
impl NatNet
[src]
fn new<V: Into<Version>>(ver: V) -> NatNet
Create a new NatNet
parser with the given version
This will create a new parser that utilizes the given version
for subsequent unpack
calls
fn unpack_with<B: BufRead>(
ver: &Version,
bytes: &mut B
) -> Result<NatNetResponse>
ver: &Version,
bytes: &mut B
) -> Result<NatNetResponse>
Unpack a message from NatNet
using a specified version
This will try to unpack a message coming from a NatNet application assuming the message uses the given version
fn unpack_type_with<B: BufRead>(
t: NatNetMsgType,
ver: &Version,
bytes: &mut B
) -> Option<Result<NatNetResponse>>
t: NatNetMsgType,
ver: &Version,
bytes: &mut B
) -> Option<Result<NatNetResponse>>
Unpack only NatNetMsgType
messages
This method unpacks only messages of the requested type. The function
will consume the header of any NatNet
message to check if it is the
correct message and unpack only if it is. This method can be useful when
needing to unpack only sender messages if NatNet
version is unknown.
fn unpack<B: BufRead>(&self, bytes: &mut B) -> Result<NatNetResponse>
Unpack a message from NatNet
fn unpack_type<B: BufRead>(
&self,
t: NatNetMsgType,
bytes: &mut B
) -> Option<Result<NatNetResponse>>
&self,
t: NatNetMsgType,
bytes: &mut B
) -> Option<Result<NatNetResponse>>
Unpack only NatNetMsgType
messages
This method unpacks only messages of the requested type. The function
will consume the header of any NatNet
message to check if it is the
correct message and unpack only if it is. This method can be useful when
needing to unpack only sender messages if NatNet
version is unknown.
Trait Implementations
impl Clone for NatNet
[src]
fn clone(&self) -> NatNet
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more