pub struct OwnedFB<T> { /* private fields */ }Expand description
Stores the owned bytes of the flatbuffer type and can access the actual type.
Implementations§
Source§impl<T> OwnedFB<T>
impl<T> OwnedFB<T>
pub fn new<'a>(buf: &'a [u8]) -> OwnedFB<T>where
T: Verifiable + Follow<'a> + 'a,
Sourcepub unsafe fn new_boxed_unchecked(buf: Box<[u8]>) -> Self
pub unsafe fn new_boxed_unchecked(buf: Box<[u8]>) -> Self
§Safety
Caller is responsible for verifying the buffer.
pub fn new_boxed(buf: Box<[u8]>) -> Result<OwnedFB<T>, InvalidFlatbuffer>where
T: Verifiable + Follow<'static> + 'static,
pub fn get_ref<'a>(&'a self) -> <T as Follow<'a>>::Innerwhere
T: Follow<'a>,
pub fn get_slice(&self) -> &[u8] ⓘ
Auto Trait Implementations§
impl<T> Freeze for OwnedFB<T>
impl<T> RefUnwindSafe for OwnedFB<T>where
T: RefUnwindSafe,
impl<T> Send for OwnedFB<T>where
T: Send,
impl<T> Sync for OwnedFB<T>where
T: Sync,
impl<T> Unpin for OwnedFB<T>where
T: Unpin,
impl<T> UnwindSafe for OwnedFB<T>where
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