pub struct AbstractPtr<'a, M, T, A = ReadWrite>where
T: ?Sized,{ /* private fields */ }
Implementations§
Source§impl<M, T, A> AbstractPtr<'_, M, T, A>where
M: AtomicOps<T>,
impl<M, T, A> AbstractPtr<'_, M, T, A>where
M: AtomicOps<T>,
pub fn atomic_load(self, order: Ordering) -> M::Value
pub fn atomic_store(self, val: M::Value, order: Ordering)
pub fn atomic_swap(self, val: M::Value, order: Ordering) -> M::Value
pub fn atomic_compare_exchange( self, current: M::Value, new: M::Value, success: Ordering, failure: Ordering, ) -> Result<M::Value, M::Value>
pub fn atomic_compare_exchange_weak( self, current: M::Value, new: M::Value, success: Ordering, failure: Ordering, ) -> Result<M::Value, M::Value>
pub fn atomic_fetch_add(self, val: M::Value, order: Ordering) -> M::Value
pub fn atomic_fetch_sub(self, val: M::Value, order: Ordering) -> M::Value
pub fn atomic_fetch_and(self, val: M::Value, order: Ordering) -> M::Value
pub fn atomic_fetch_nand(self, val: M::Value, order: Ordering) -> M::Value
pub fn atomic_fetch_or(self, val: M::Value, order: Ordering) -> M::Value
pub fn atomic_fetch_xor(self, val: M::Value, order: Ordering) -> M::Value
pub fn atomic_fetch_update<F>( self, set_order: Ordering, fetch_order: Ordering, f: F, ) -> Result<M::Value, M::Value>
pub fn atomic_fetch_max(self, val: M::Value, order: Ordering) -> M::Value
pub fn atomic_fetch_min(self, val: M::Value, order: Ordering) -> M::Value
Source§impl<'a, M, T> AbstractPtr<'a, M, T>where
T: ?Sized,
Constructor functions.
impl<'a, M, T> AbstractPtr<'a, M, T>where
T: ?Sized,
Constructor functions.
pub unsafe fn new(pointer: NonNull<T>) -> AbstractPtr<'a, M, T, ReadWrite>
pub const unsafe fn new_read_only( pointer: NonNull<T>, ) -> AbstractPtr<'a, M, T, ReadOnly>
pub const unsafe fn new_restricted<A>(
access: A,
pointer: NonNull<T>,
) -> AbstractPtr<'a, M, T, A>where
A: Access,
Source§impl<'a, M, T, A> AbstractPtr<'a, M, T, A>where
T: ?Sized,
impl<'a, M, T, A> AbstractPtr<'a, M, T, A>where
T: ?Sized,
pub fn read(self) -> Twhere
M: UnitaryOps<T>,
T: Sized,
A: Readable,
pub fn write(self, value: T)where
M: UnitaryOps<T>,
T: Sized,
A: Writable,
pub fn update<F>(self, f: F)
pub fn as_raw_ptr(self) -> NonNull<T>
pub unsafe fn map<F, U>(self, f: F) -> AbstractPtr<'a, M, U, A>where
F: FnOnce(NonNull<T>) -> NonNull<U>,
A: Access,
U: ?Sized,
Source§impl<'a, M, T, A> AbstractPtr<'a, M, T, A>where
T: ?Sized,
Methods for restricting access.
impl<'a, M, T, A> AbstractPtr<'a, M, T, A>where
T: ?Sized,
Methods for restricting access.
pub fn restrict<To>(self) -> AbstractPtr<'a, M, T, A::Restricted>where
A: RestrictAccess<To>,
Source§impl<'a, M, T> AbstractPtr<'a, M, T, ReadWrite>where
T: ?Sized,
Methods for restricting access.
impl<'a, M, T> AbstractPtr<'a, M, T, ReadWrite>where
T: ?Sized,
Methods for restricting access.
pub fn read_only(self) -> AbstractPtr<'a, M, T, ReadOnly>
pub fn write_only(self) -> AbstractPtr<'a, M, T, WriteOnly>
Source§impl<'a, M, T, A> AbstractPtr<'a, M, [T], A>
impl<'a, M, T, A> AbstractPtr<'a, M, [T], A>
pub fn len(self) -> usize
pub fn is_empty(self) -> bool
pub fn index<I>(
self,
index: I,
) -> AbstractPtr<'a, M, <I as SliceIndex<[T]>>::Output, A>where
I: AbstractPtrSliceIndex<[T]> + SliceIndex<[()]> + Clone,
A: Access,
pub fn iter(self) -> impl Iterator<Item = AbstractPtr<'a, M, T, A>>where
A: Access,
pub fn copy_into_slice(self, dst: &mut [T])
pub fn copy_from_slice(self, src: &[T])
pub fn copy_within(self, src: impl RangeBounds<usize>, dest: usize)
pub fn split_at(
self,
mid: usize,
) -> (AbstractPtr<'a, M, [T], A>, AbstractPtr<'a, M, [T], A>)where
A: Access,
pub fn as_chunks<const N: usize>(
self,
) -> (AbstractPtr<'a, M, [[T; N]], A>, AbstractPtr<'a, M, [T], A>)where
A: Access,
pub unsafe fn as_chunks_unchecked<const N: usize>(
self,
) -> AbstractPtr<'a, M, [[T; N]], A>where
A: Access,
Source§impl<M, A> AbstractPtr<'_, M, [u8], A>
impl<M, A> AbstractPtr<'_, M, [u8], A>
Source§impl<'a, M, T, A, const N: usize> AbstractPtr<'a, M, [T; N], A>
Methods for converting arrays to slices
impl<'a, M, T, A, const N: usize> AbstractPtr<'a, M, [T; N], A>
Methods for converting arrays to slices
pub fn as_slice(self) -> AbstractPtr<'a, M, [T], A>where
A: Access,
Trait Implementations§
Source§impl<M, T, A> Clone for AbstractPtr<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Clone for AbstractPtr<'_, M, T, A>where
T: ?Sized,
Source§impl<M, T, A> Debug for AbstractPtr<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Debug for AbstractPtr<'_, M, T, A>where
T: ?Sized,
Source§impl<M, T, A> Hash for AbstractPtr<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Hash for AbstractPtr<'_, M, T, A>where
T: ?Sized,
Source§impl<M, T, A> Ord for AbstractPtr<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Ord for AbstractPtr<'_, M, T, A>where
T: ?Sized,
Source§impl<M, T, A> PartialEq for AbstractPtr<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> PartialEq for AbstractPtr<'_, M, T, A>where
T: ?Sized,
Source§impl<M, T, A> PartialOrd for AbstractPtr<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> PartialOrd for AbstractPtr<'_, M, T, A>where
T: ?Sized,
Source§impl<M, T, A> Pointer for AbstractPtr<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Pointer for AbstractPtr<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Copy for AbstractPtr<'_, M, T, A>where
T: ?Sized,
impl<M, T, A> Eq for AbstractPtr<'_, M, T, A>where
T: ?Sized,
Auto Trait Implementations§
impl<'a, M, T, A> Freeze for AbstractPtr<'a, M, T, A>where
T: ?Sized,
impl<'a, M, T, A> RefUnwindSafe for AbstractPtr<'a, M, T, A>where
M: RefUnwindSafe,
A: RefUnwindSafe,
T: RefUnwindSafe + ?Sized,
impl<'a, M, T, A = ReadWrite> !Send for AbstractPtr<'a, M, T, A>
impl<'a, M, T, A = ReadWrite> !Sync for AbstractPtr<'a, M, T, A>
impl<'a, M, T, A> Unpin for AbstractPtr<'a, M, T, A>where
M: Unpin,
A: Unpin,
T: ?Sized,
impl<'a, M, T, A> UnwindSafe for AbstractPtr<'a, M, T, A>where
T: RefUnwindSafe + ?Sized,
M: UnwindSafe,
A: UnwindSafe,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)