pub struct Bucket<T> { /* private fields */ }
Expand description
A reference to a hash table bucket containing a T
.
This is usually just a pointer to the element itself. However if the element
is a ZST, then we instead track the index of the element in the table so
that erase
works properly.
Implementations
sourceimpl<T> Bucket<T>
impl<T> Bucket<T>
pub fn as_ptr(&self) -> *mut T
pub unsafe fn drop(&self)
pub unsafe fn read(&self) -> T
pub unsafe fn write(&self, val: T)
pub unsafe fn as_ref<'a>(&self) -> &'a T
pub unsafe fn as_mut<'a>(&self) -> &'a mut T
pub unsafe fn copy_from_nonoverlapping(&self, other: &Self)
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Bucket<T> where
T: RefUnwindSafe,
impl<T> !Sync for Bucket<T>
impl<T> Unpin for Bucket<T>
impl<T> UnwindSafe for Bucket<T> where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more