pub struct Frame {
pub desc: MsgDescHot,
pub payload: Option<Vec<u8>>,
}Expand description
Owned frame for sending or storage.
Fields§
§desc: MsgDescHotThe frame descriptor.
payload: Option<Vec<u8>>Optional payload (None if inline or empty).
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn new(desc: MsgDescHot) -> Self
pub fn new(desc: MsgDescHot) -> Self
Create a new frame with the given descriptor.
Sourcepub fn with_inline_payload(desc: MsgDescHot, payload: &[u8]) -> Option<Self>
pub fn with_inline_payload(desc: MsgDescHot, payload: &[u8]) -> Option<Self>
Create a frame with inline payload.
Sourcepub fn with_payload(desc: MsgDescHot, payload: Vec<u8>) -> Self
pub fn with_payload(desc: MsgDescHot, payload: Vec<u8>) -> Self
Create a frame with external payload.
Note: For owned frames with external payload, we use a sentinel slot value (0) to distinguish from inline. The actual slot is only meaningful for SHM transport.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)