#[non_exhaustive]#[repr(C)]pub struct SliceVTable {
pub len: SliceLenFn,
pub get_item_ptr: SliceGetItemPtrFn,
}Expand description
Virtual table for a slice-like type (like Vec<T>,
but also HashSet<T>, etc.)
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.len: SliceLenFnNumber of items in the slice
get_item_ptr: SliceGetItemPtrFnGet pointer to the item at the given index. Panics if out of bounds.
Implementations§
Source§impl SliceVTable
impl SliceVTable
Sourcepub const fn builder() -> SliceVTableBuilder
pub const fn builder() -> SliceVTableBuilder
Returns a builder for SliceVTable
Trait Implementations§
Source§impl Clone for SliceVTable
impl Clone for SliceVTable
Source§fn clone(&self) -> SliceVTable
fn clone(&self) -> SliceVTable
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SliceVTable
impl Debug for SliceVTable
Source§impl Hash for SliceVTable
impl Hash for SliceVTable
Source§impl PartialEq for SliceVTable
impl PartialEq for SliceVTable
impl Copy for SliceVTable
impl Eq for SliceVTable
impl StructuralPartialEq for SliceVTable
Auto Trait Implementations§
impl Freeze for SliceVTable
impl RefUnwindSafe for SliceVTable
impl Send for SliceVTable
impl Sync for SliceVTable
impl Unpin for SliceVTable
impl UnwindSafe for SliceVTable
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