pub struct BlobVec { /* private fields */ }
Implementations
sourceimpl BlobVec
impl BlobVec
pub fn new(
item_layout: Layout,
drop: Option<unsafe fn(_: *mut u8)>,
capacity: usize
) -> BlobVec
pub const fn len(&self) -> usize
pub const fn capacity(&self) -> usize
pub const fn is_empty(&self) -> bool
pub const fn item_layout(&self) -> Layout
sourcepub const unsafe fn get_unchecked(&self, index: usize) -> *mut u8
pub const unsafe fn get_unchecked(&self, index: usize) -> *mut u8
Safety
index
must be in bounds
sourcepub unsafe fn initialize_unchecked(&mut self, index: usize, value: *mut u8)
pub unsafe fn initialize_unchecked(&mut self, index: usize, value: *mut u8)
Safety
index
must be in bounds
sourcepub unsafe fn replace_unchecked(&mut self, index: usize, value: *mut u8)
pub unsafe fn replace_unchecked(&mut self, index: usize, value: *mut u8)
Safety
index
must be in bounds- the memory at
index
must be initialized matchingself.item_layout
sourcepub unsafe fn swap_remove_unchecked(&mut self, index: usize, ptr: *mut u8)
pub unsafe fn swap_remove_unchecked(&mut self, index: usize, ptr: *mut u8)
Safety
index
must be in bounds- the memory at
index
must be initialized
sourcepub unsafe fn swap_remove_and_drop_unchecked(&mut self, index: usize)
pub unsafe fn swap_remove_and_drop_unchecked(&mut self, index: usize)
Safety
index
must be in bounds- the memory at
index
must be initialized
pub fn reserve_exact(&mut self, additional: usize)
pub fn clear(&mut self)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BlobVec
impl !Send for BlobVec
impl !Sync for BlobVec
impl Unpin for BlobVec
impl UnwindSafe for BlobVec
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more