pub struct SetBufferLength(/* private fields */);
Expand description
The event to tell that its stream will be buffered, to the server.
Following format is required:
Event Data | Length (in bytes) | Description |
---|---|---|
Message ID | 4 | The message ID which is same as contained in createStream . |
Buffer Length | 4 | A time length to charge a data into a stream (in milliseconds). |
Implementations§
Source§impl SetBufferLength
impl SetBufferLength
Sourcepub fn get_message_id(&self) -> u32
pub fn get_message_id(&self) -> u32
Gets the message ID which this event has.
Sourcepub fn get_buffering_time(&self) -> u32
pub fn get_buffering_time(&self) -> u32
Gets the buffering time which this event has.
Trait Implementations§
Source§impl ChunkData for SetBufferLength
impl ChunkData for SetBufferLength
const CHANNEL: Channel = Channel::Network
const MESSAGE_TYPE: MessageType = MessageType::UserControl
Source§impl Clone for SetBufferLength
impl Clone for SetBufferLength
Source§fn clone(&self) -> SetBufferLength
fn clone(&self) -> SetBufferLength
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 SetBufferLength
impl Debug for SetBufferLength
Source§impl Decoder<SetBufferLength> for ByteBuffer
impl Decoder<SetBufferLength> for ByteBuffer
Source§fn decode(&mut self) -> IOResult<SetBufferLength>
fn decode(&mut self) -> IOResult<SetBufferLength>
Decodes bytes into a SetBufferLength event.
§Errors
When some field misses.
§Examples
use sheave_core::{
ByteBuffer,
Decoder,
Encoder,
messages::{
EventType,
SetBufferLength
}
};
let mut buffer = ByteBuffer::default();
buffer.put_u32_be(u32::default());
buffer.put_u32_be(u32::default());
assert!(Decoder::<SetBufferLength>::decode(&mut buffer).is_ok());
let mut buffer = ByteBuffer::default();
assert!(Decoder::<SetBufferLength>::decode(&mut buffer).is_err())
Source§impl Encoder<SetBufferLength> for ByteBuffer
impl Encoder<SetBufferLength> for ByteBuffer
Source§fn encode(&mut self, set_buffer_length: &SetBufferLength)
fn encode(&mut self, set_buffer_length: &SetBufferLength)
Encodes a SetBufferLength event into bytes.
Source§impl From<SetBufferLength> for (u32, u32)
impl From<SetBufferLength> for (u32, u32)
Source§fn from(set_buffer_length: SetBufferLength) -> Self
fn from(set_buffer_length: SetBufferLength) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SetBufferLength
impl PartialEq for SetBufferLength
Source§impl UserControl for SetBufferLength
impl UserControl for SetBufferLength
const EVENT_TYPE: EventType = EventType::SetBufferLength
impl Copy for SetBufferLength
impl Eq for SetBufferLength
impl StructuralPartialEq for SetBufferLength
Auto Trait Implementations§
impl Freeze for SetBufferLength
impl RefUnwindSafe for SetBufferLength
impl Send for SetBufferLength
impl Sync for SetBufferLength
impl Unpin for SetBufferLength
impl UnwindSafe for SetBufferLength
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