Struct ClientPayload
#[non_exhaustive]pub struct ClientPayload {
pub channel: String,
pub data: Vec<u8>,
}Expand description
The channel and uninterpreted bytes of a server custom payload.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.channel: StringThe namespaced plugin channel, exactly as received.
data: Vec<u8>The payload bytes, without the packet id or channel prefix.
Implementations§
§impl ClientPayload
impl ClientPayload
pub fn new(channel: String, data: Vec<u8>) -> ClientPayload
pub fn new(channel: String, data: Vec<u8>) -> ClientPayload
Construct a custom payload without interpreting its bytes.
Trait Implementations§
§impl Clone for ClientPayload
impl Clone for ClientPayload
§fn clone(&self) -> ClientPayload
fn clone(&self) -> ClientPayload
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 more§impl Debug for ClientPayload
impl Debug for ClientPayload
§impl PartialEq for ClientPayload
impl PartialEq for ClientPayload
impl StructuralPartialEq for ClientPayload
Auto Trait Implementations§
impl Freeze for ClientPayload
impl RefUnwindSafe for ClientPayload
impl Send for ClientPayload
impl Sync for ClientPayload
impl Unpin for ClientPayload
impl UnsafeUnpin for ClientPayload
impl UnwindSafe for ClientPayload
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