pub struct SliceVTableBuilder { /* private fields */ }Expand description
Builds a SliceVTable
Implementations§
Source§impl SliceVTableBuilder
impl SliceVTableBuilder
Sourcepub const fn new() -> SliceVTableBuilder
pub const fn new() -> SliceVTableBuilder
Creates a new SliceVTableBuilder with all fields set to None.
Sourcepub const fn len(
self,
f: unsafe fn(PtrConst<'_>) -> usize,
) -> SliceVTableBuilder
pub const fn len( self, f: unsafe fn(PtrConst<'_>) -> usize, ) -> SliceVTableBuilder
Sets the len field
Sourcepub const fn get_item_ptr(
self,
f: unsafe fn(PtrConst<'_>, usize) -> PtrConst<'_>,
) -> SliceVTableBuilder
pub const fn get_item_ptr( self, f: unsafe fn(PtrConst<'_>, usize) -> PtrConst<'_>, ) -> SliceVTableBuilder
Sets the get_item_ptr field
Sourcepub const fn build(self) -> SliceVTable
pub const fn build(self) -> SliceVTable
Builds the SliceVTable 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 SliceVTableBuilder
impl RefUnwindSafe for SliceVTableBuilder
impl Send for SliceVTableBuilder
impl Sync for SliceVTableBuilder
impl Unpin for SliceVTableBuilder
impl UnwindSafe for SliceVTableBuilder
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