pub struct TransactionPtr { /* private fields */ }Implementations§
Source§impl TransactionPtr
impl TransactionPtr
Sourcepub unsafe fn from_raw_parts(ptr: NonNull<u8>, count: usize) -> Self
pub unsafe fn from_raw_parts(ptr: NonNull<u8>, count: usize) -> Self
Constructions a TransactionPtr from raw parts.
§Safety
ptrmust be valid for reads.countmust be accurate and not overrun the end ofptr.
§Note
If you are trying to construct a pointer for use by Agave, you almost certainly want to use
Self::from_sharable_transaction_region.
Sourcepub unsafe fn from_sharable_transaction_region(
sharable_transaction_region: &SharableTransactionRegion,
allocator: &Allocator,
) -> Self
pub unsafe fn from_sharable_transaction_region( sharable_transaction_region: &SharableTransactionRegion, allocator: &Allocator, ) -> Self
§Safety
sharable_transaction_regionmust reference a valid offset and length within theallocator.
Sourcepub unsafe fn to_sharable_transaction_region(
&self,
allocator: &Allocator,
) -> SharableTransactionRegion
pub unsafe fn to_sharable_transaction_region( &self, allocator: &Allocator, ) -> SharableTransactionRegion
Translate the ptr type into a sharable region.
§Safety
allocatormust be the allocator owning the memory region pointed to byself.
Sourcepub unsafe fn free(self, allocator: &Allocator)
pub unsafe fn free(self, allocator: &Allocator)
Frees the memory region pointed to in the allocator.
This should only be called by the owner of the memory
i.e. the external scheduler.
§Safety
- Data region pointed to by
TransactionPtrbelongs to theallocator. - Inner
ptrmust not have been previously freed.
Trait Implementations§
Source§impl Debug for TransactionPtr
impl Debug for TransactionPtr
Source§impl TransactionData for TransactionPtr
impl TransactionData for TransactionPtr
Source§impl TransactionData for &TransactionPtr
impl TransactionData for &TransactionPtr
Auto Trait Implementations§
impl !Send for TransactionPtr
impl !Sync for TransactionPtr
impl Freeze for TransactionPtr
impl RefUnwindSafe for TransactionPtr
impl Unpin for TransactionPtr
impl UnsafeUnpin for TransactionPtr
impl UnwindSafe for TransactionPtr
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more