pub struct FBBuilder<T> { /* private fields */ }Expand description
Wrapper of FlatBufferBuilder to provide OwnedFB creation. This is to make type safe when using builder_collapse.
Implementations§
Source§impl<T> FBBuilder<T>
impl<T> FBBuilder<T>
pub fn new() -> FBBuilder<T>
Sourcepub fn get_mut(&mut self) -> &mut FlatBufferBuilder<'static>
pub fn get_mut(&mut self) -> &mut FlatBufferBuilder<'static>
Get mutable reference to the builder.
Sourcepub fn finish_owned(self, root: WIPOffset<T>) -> OwnedFB<T>
pub fn finish_owned(self, root: WIPOffset<T>) -> OwnedFB<T>
Finish the buffer and create OwnedFB. User still need to check the the root is created from this builder, otherwise there will be runtime error. (This is not marked unsafe, due to flatbuffers APIs are not marked as unsafe.) See issue: https://github.com/google/flatbuffers/issues/8698
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for FBBuilder<T>
impl<T> RefUnwindSafe for FBBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for FBBuilder<T>where
T: Send,
impl<T> Sync for FBBuilder<T>where
T: Sync,
impl<T> Unpin for FBBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for FBBuilder<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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request