Struct wasmrs::RawPayload
source · pub struct RawPayload {
pub metadata: Option<Bytes>,
pub data: Option<Bytes>,
}Expand description
A complete [Payload] object that includes metadata and data bytes.
Fields§
§metadata: Option<Bytes>Metadata bytes if they exist.
data: Option<Bytes>The core payload data bytes if it exists.
Implementations§
source§impl RawPayload
impl RawPayload
sourcepub fn new(metadata: Bytes, data: Bytes) -> RawPayload
pub fn new(metadata: Bytes, data: Bytes) -> RawPayload
Create a new payload with the passed metadata and data bytes.
sourcepub fn new_data(metadata: Option<Bytes>, data: Option<Bytes>) -> RawPayload
pub fn new_data(metadata: Option<Bytes>, data: Option<Bytes>) -> RawPayload
Create new payload with just data and no metadata set yet.
sourcepub fn empty() -> RawPayload
pub fn empty() -> RawPayload
Create an empty payload.
Trait Implementations§
source§impl Clone for RawPayload
impl Clone for RawPayload
source§fn clone(&self) -> RawPayload
fn clone(&self) -> RawPayload
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 RawPayload
impl Debug for RawPayload
source§impl Default for RawPayload
impl Default for RawPayload
source§fn default() -> RawPayload
fn default() -> RawPayload
Returns the “default value” for a type. Read more
source§impl From<PayloadFrame> for RawPayload
impl From<PayloadFrame> for RawPayload
source§fn from(req: PayloadFrame) -> RawPayload
fn from(req: PayloadFrame) -> RawPayload
Converts to this type from the input type.
source§impl From<RequestChannel> for RawPayload
impl From<RequestChannel> for RawPayload
source§fn from(req: RequestChannel) -> RawPayload
fn from(req: RequestChannel) -> RawPayload
Converts to this type from the input type.
source§impl From<RequestFnF> for RawPayload
impl From<RequestFnF> for RawPayload
source§fn from(req: RequestFnF) -> RawPayload
fn from(req: RequestFnF) -> RawPayload
Converts to this type from the input type.
source§impl From<RequestPayload> for RawPayload
impl From<RequestPayload> for RawPayload
source§fn from(req: RequestPayload) -> RawPayload
fn from(req: RequestPayload) -> RawPayload
Converts to this type from the input type.
source§impl From<RequestResponse> for RawPayload
impl From<RequestResponse> for RawPayload
source§fn from(req: RequestResponse) -> RawPayload
fn from(req: RequestResponse) -> RawPayload
Converts to this type from the input type.
source§impl From<RequestStream> for RawPayload
impl From<RequestStream> for RawPayload
source§fn from(req: RequestStream) -> RawPayload
fn from(req: RequestStream) -> RawPayload
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for RawPayload
impl Send for RawPayload
impl Sync for RawPayload
impl Unpin for RawPayload
impl UnwindSafe for RawPayload
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