pub struct BlobVec { /* private fields */ }Implementations§
source§impl 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
indexmust 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
indexmust 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
indexmust be in bounds- the memory at
indexmust 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
indexmust be in bounds- the memory at
indexmust 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
indexmust be in bounds- the memory at
indexmust 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§
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn 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 moresource§fn 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 moresource§fn 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 moresource§fn 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