pub struct SetDataFrame(/* private fields */);
Expand description
The message to handle something data.
Implementations§
Trait Implementations§
Source§impl ChunkData for SetDataFrame
impl ChunkData for SetDataFrame
const CHANNEL: Channel = Channel::Audio
const MESSAGE_TYPE: MessageType = MessageType::Data
Source§impl Clone for SetDataFrame
impl Clone for SetDataFrame
Source§fn clone(&self) -> SetDataFrame
fn clone(&self) -> SetDataFrame
Returns a copy 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 Debug for SetDataFrame
impl Debug for SetDataFrame
Source§impl Decoder<SetDataFrame> for ByteBuffer
impl Decoder<SetDataFrame> for ByteBuffer
Source§fn decode(&mut self) -> IOResult<SetDataFrame>
fn decode(&mut self) -> IOResult<SetDataFrame>
Decodes bytes into a SetDataFrame message.
§Errors
When some field misses.
When some value is inconsistent with its marker.
When some value is invalid for UTF-8 string.
When the command name isn’t "@setDataFrame"
.
§Examples
use rand::{
Fill,
thread_rng
};
use sheave_core::{
ByteBuffer,
Decoder,
Encoder,
messages::SetDataFrame
};
let mut buffer = ByteBuffer::default();
let mut bytes: [u8; 128] = [0; 128];
bytes.try_fill(&mut thread_rng()).unwrap();
buffer.put_bytes(&bytes);
assert!(Decoder::<SetDataFrame>::decode(&mut buffer).is_ok());
Source§impl Default for SetDataFrame
impl Default for SetDataFrame
Source§fn default() -> SetDataFrame
fn default() -> SetDataFrame
Returns the “default value” for a type. Read more
Source§impl Encoder<SetDataFrame> for ByteBuffer
impl Encoder<SetDataFrame> for ByteBuffer
Source§fn encode(&mut self, set_data_frame: &SetDataFrame)
fn encode(&mut self, set_data_frame: &SetDataFrame)
Encodes a SetDataFrame message into bytes.
Source§impl From<SetDataFrame> for Vec<u8>
impl From<SetDataFrame> for Vec<u8>
Source§fn from(set_data_frame: SetDataFrame) -> Self
fn from(set_data_frame: SetDataFrame) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SetDataFrame
impl PartialEq for SetDataFrame
Source§impl TryFrom<ScriptDataTag> for SetDataFrame
impl TryFrom<ScriptDataTag> for SetDataFrame
Source§impl TryFrom<SetDataFrame> for ScriptDataTag
impl TryFrom<SetDataFrame> for ScriptDataTag
impl Eq for SetDataFrame
impl StructuralPartialEq for SetDataFrame
Auto Trait Implementations§
impl Freeze for SetDataFrame
impl RefUnwindSafe for SetDataFrame
impl Send for SetDataFrame
impl Sync for SetDataFrame
impl Unpin for SetDataFrame
impl UnwindSafe for SetDataFrame
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