Struct contiguous_mem::ImplDefault
source · pub struct ImplDefault;Expand description
A marker struct representing the behavior specialization that does not require thread-safety. This implementation skips mutexes, making it faster but unsuitable for concurrent usage.
Trait Implementations§
source§impl Clone for ImplDefault
impl Clone for ImplDefault
source§fn clone(&self) -> ImplDefault
fn clone(&self) -> ImplDefault
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<T: ?Sized> ContiguousMemoryReference<T, ImplDefault> for ContiguousMemoryRef<T>
impl<T: ?Sized> ContiguousMemoryReference<T, ImplDefault> for ContiguousMemoryRef<T>
source§fn try_get_mut<'a>(
&'a mut self
) -> Result<MemoryWriteGuard<'a, T, ImplDefault>, RegionBorrowed>where
T: RefSizeReq,
fn try_get_mut<'a>( &'a mut self ) -> Result<MemoryWriteGuard<'a, T, ImplDefault>, RegionBorrowed>where T: RefSizeReq,
This implementation returns a RegionBorrowed error if the
represented memory region is already borrowed.
§type BorrowError = RegionBorrowed
type BorrowError = RegionBorrowed
Error type returned when the data represented by the reference can’t be
safely accessed/borrowed.
source§fn range(&self) -> ByteRange
fn range(&self) -> ByteRange
Returns a byte range within container memory this reference points to.
source§fn get<'a>(&'a self) -> MemoryReadGuard<'a, T, ImplDefault>where
T: RefSizeReq,
fn get<'a>(&'a self) -> MemoryReadGuard<'a, T, ImplDefault>where T: RefSizeReq,
Returns a reference to data at its current location and panics if the
reference has been mutably borrowed or blocks the thread for the
concurrent implementation.
source§fn try_get<'a>(
&'a self
) -> Result<MemoryReadGuard<'a, T, ImplDefault>, RegionBorrowed>where
T: RefSizeReq,
fn try_get<'a>( &'a self ) -> Result<MemoryReadGuard<'a, T, ImplDefault>, RegionBorrowed>where T: RefSizeReq,
Returns a reference to data at its current location and returns the
appropriate error if that’s not possible.
source§fn get_mut<'a>(&'a mut self) -> MemoryWriteGuard<'a, T, ImplDefault>where
T: RefSizeReq,
fn get_mut<'a>(&'a mut self) -> MemoryWriteGuard<'a, T, ImplDefault>where T: RefSizeReq,
Returns a mutable reference to data at its current location and panics
if the reference has been mutably borrowed or blocks the thread for
concurrent implementation.
source§impl PartialEq<ImplDefault> for ImplDefault
impl PartialEq<ImplDefault> for ImplDefault
source§fn eq(&self, other: &ImplDefault) -> bool
fn eq(&self, other: &ImplDefault) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl StoreData<ImplDefault> for ContiguousMemoryStorage<ImplDefault>
impl StoreData<ImplDefault> for ContiguousMemoryStorage<ImplDefault>
source§unsafe fn store_data<T: StoreRequirements>(
&mut self,
data: *mut T,
layout: Layout
) -> ContiguousMemoryRef<T>
unsafe fn store_data<T: StoreRequirements>( &mut self, data: *mut T, layout: Layout ) -> ContiguousMemoryRef<T>
Returns a ContiguousMemoryRef pointing to the stored value.
impl Copy for ImplDefault
impl Eq for ImplDefault
impl StructuralEq for ImplDefault
impl StructuralPartialEq for ImplDefault
Auto Trait Implementations§
impl RefUnwindSafe for ImplDefault
impl Send for ImplDefault
impl Sync for ImplDefault
impl Unpin for ImplDefault
impl UnwindSafe for ImplDefault
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