Struct exocore_core::framing::capnp::TypedCapnpFrame
source · pub struct TypedCapnpFrame<I: FrameReader, T>where
T: MessageType,{ /* private fields */ }
Expand description
Frame that wraps a Capnpframe with type annotation.
Implementations§
source§impl<I: FrameReader, T> TypedCapnpFrame<I, T>where
T: MessageType,
impl<I: FrameReader, T> TypedCapnpFrame<I, T>where T: MessageType,
pub fn new(data: I) -> Result<TypedCapnpFrame<I, T>, Error>
pub fn from_capnp( capnp_frame: CapnpFrame<I> ) -> Result<TypedCapnpFrame<I, T>, Error>
pub fn inner(&self) -> &CapnpFrame<I>
pub fn get_reader(&self) -> Result<<T as Owned>::Reader<'_>, Error>
pub fn to_owned(&self) -> TypedCapnpFrame<I::OwnedType, T>
Trait Implementations§
source§impl<I: FrameReader + Clone, T> Clone for TypedCapnpFrame<I, T>where
T: MessageType,
impl<I: FrameReader + Clone, T> Clone for TypedCapnpFrame<I, T>where T: MessageType,
source§impl<I: FrameReader, T> FrameReader for TypedCapnpFrame<I, T>where
T: MessageType,
impl<I: FrameReader, T> FrameReader for TypedCapnpFrame<I, T>where T: MessageType,
type OwnedType = TypedCapnpFrame<CapnpFrame<<I as FrameReader>::OwnedType>, T>
source§fn exposed_data(&self) -> &[u8] ⓘ
fn exposed_data(&self) -> &[u8] ⓘ
Data exposed by this frame to inner frame.
Ex: sized frame will expose the sized data without encoded size numbers
source§fn whole_data(&self) -> &[u8] ⓘ
fn whole_data(&self) -> &[u8] ⓘ
Data of the whole frame, not just the exposed data.
source§fn to_owned_frame(&self) -> Self::OwnedType
fn to_owned_frame(&self) -> Self::OwnedType
Converts the frame to a owned version (without lifetime)
source§fn whole_data_size(&self) -> usize
fn whole_data_size(&self) -> usize
Size of the whole data of the frame.
Auto Trait Implementations§
impl<I, T> RefUnwindSafe for TypedCapnpFrame<I, T>where I: RefUnwindSafe, T: RefUnwindSafe,
impl<I, T> Send for TypedCapnpFrame<I, T>where I: Send, T: Send,
impl<I, T> Sync for TypedCapnpFrame<I, T>where I: Sync, T: Sync,
impl<I, T> Unpin for TypedCapnpFrame<I, T>where I: Unpin, T: Unpin,
impl<I, T> UnwindSafe for TypedCapnpFrame<I, T>where I: UnwindSafe, T: UnwindSafe,
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