pub struct OptionVTableBuilder { /* private fields */ }Expand description
Builds an OptionVTable
Implementations§
Source§impl OptionVTableBuilder
impl OptionVTableBuilder
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new OptionVTableBuilder with all fields set to None.
Sourcepub const fn is_some(self, f: OptionIsSomeFn) -> Self
pub const fn is_some(self, f: OptionIsSomeFn) -> Self
Sets the is_some_fn field
Sourcepub const fn get_value(self, f: OptionGetValueFn) -> Self
pub const fn get_value(self, f: OptionGetValueFn) -> Self
Sets the get_value_fn field
Sourcepub const fn init_some(self, f: OptionInitSomeFn) -> Self
pub const fn init_some(self, f: OptionInitSomeFn) -> Self
Sets the init_some_fn field
Sourcepub const fn init_none(self, f: OptionInitNoneFn) -> Self
pub const fn init_none(self, f: OptionInitNoneFn) -> Self
Sets the init_none_fn field
Sourcepub const fn replace_with(self, f: OptionReplaceWithFn) -> Self
pub const fn replace_with(self, f: OptionReplaceWithFn) -> Self
Sets the replace_with_fn field
Sourcepub const fn build(self) -> OptionVTable
pub const fn build(self) -> OptionVTable
Builds the OptionVTable from the current state of the builder.
§Panics
This method will panic if any of the required fields are None.
Auto Trait Implementations§
impl Freeze for OptionVTableBuilder
impl RefUnwindSafe for OptionVTableBuilder
impl Send for OptionVTableBuilder
impl Sync for OptionVTableBuilder
impl Unpin for OptionVTableBuilder
impl UnwindSafe for OptionVTableBuilder
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