pub struct RawMessage<'s> { /* private fields */ }
Expand description
AudioSocket raw message.
Implementations§
Source§impl<'s> RawMessage<'s>
impl<'s> RawMessage<'s>
Sourcepub fn from_parts(message_type: Type, payload: Option<&'s [u8]>) -> Self
pub fn from_parts(message_type: Type, payload: Option<&'s [u8]>) -> Self
Create RawMessage
from raw parts.
You have to ensure that payload size is <= length
.
Sourcepub fn message_type(&self) -> &Type
pub fn message_type(&self) -> &Type
Get RawMessage
type.
Sourcepub fn payload(&self) -> &Option<&[u8]>
pub fn payload(&self) -> &Option<&[u8]>
Get RawMessage
payload.
Trait Implementations§
Source§impl<'s> Clone for RawMessage<'s>
impl<'s> Clone for RawMessage<'s>
Source§fn clone(&self) -> RawMessage<'s>
fn clone(&self) -> RawMessage<'s>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'s> Debug for RawMessage<'s>
impl<'s> Debug for RawMessage<'s>
Source§impl<'s> PartialEq for RawMessage<'s>
impl<'s> PartialEq for RawMessage<'s>
Source§impl<'s> TryFrom<&'s [u8]> for RawMessage<'s>
impl<'s> TryFrom<&'s [u8]> for RawMessage<'s>
Source§impl<'s> TryFrom<RawMessage<'s>> for Message<'s>
impl<'s> TryFrom<RawMessage<'s>> for Message<'s>
Source§type Error = AudioSocketError
type Error = AudioSocketError
The type returned in the event of a conversion error.
Source§fn try_from(
raw: RawMessage<'s>,
) -> Result<Self, <Message<'_> as TryFrom<RawMessage<'_>>>::Error>
fn try_from( raw: RawMessage<'s>, ) -> Result<Self, <Message<'_> as TryFrom<RawMessage<'_>>>::Error>
Performs the conversion.
impl<'s> Copy for RawMessage<'s>
impl<'s> Eq for RawMessage<'s>
impl<'s> StructuralPartialEq for RawMessage<'s>
Auto Trait Implementations§
impl<'s> Freeze for RawMessage<'s>
impl<'s> RefUnwindSafe for RawMessage<'s>
impl<'s> Send for RawMessage<'s>
impl<'s> Sync for RawMessage<'s>
impl<'s> Unpin for RawMessage<'s>
impl<'s> UnwindSafe for RawMessage<'s>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more