pub struct DataChannelOpen {
pub channel_type: ChannelType,
pub priority: u16,
pub reliability_parameter: u32,
pub label: Vec<u8>,
pub protocol: Vec<u8>,
}Expand description
The data-part of an data-channel OPEN message without the message type.
§Memory layout
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| (Message Type)| Channel Type | Priority |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reliability Parameter |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Label Length | Protocol Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Label |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Protocol |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Fields§
§channel_type: ChannelTypeThe reliability and ordering guarantees requested for the channel.
priority: u16The channel’s relative priority, one of the CHANNEL_PRIORITY_* constants.
reliability_parameter: u32The retransmission count or message lifetime in milliseconds, interpreted according to
Self::channel_type.
label: Vec<u8>The channel label, as UTF-8 bytes.
protocol: Vec<u8>The subprotocol name, as UTF-8 bytes. Empty if none was negotiated.
Trait Implementations§
Source§impl Clone for DataChannelOpen
impl Clone for DataChannelOpen
Source§fn clone(&self) -> DataChannelOpen
fn clone(&self) -> DataChannelOpen
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DataChannelOpen
impl Debug for DataChannelOpen
impl Eq for DataChannelOpen
Source§impl Marshal for DataChannelOpen
impl Marshal for DataChannelOpen
Source§impl MarshalSize for DataChannelOpen
impl MarshalSize for DataChannelOpen
Source§fn marshal_size(&self) -> usize
fn marshal_size(&self) -> usize
The number of bytes
Marshal::marshal_to will write for this value.Source§impl PartialEq for DataChannelOpen
impl PartialEq for DataChannelOpen
impl StructuralPartialEq for DataChannelOpen
Auto Trait Implementations§
impl Freeze for DataChannelOpen
impl RefUnwindSafe for DataChannelOpen
impl Send for DataChannelOpen
impl Sync for DataChannelOpen
impl Unpin for DataChannelOpen
impl UnsafeUnpin for DataChannelOpen
impl UnwindSafe for DataChannelOpen
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