pub struct RudaReference<T: RudaRecord> {
pub address: u64,
/* private fields */
}Expand description
Stable reference into an existing allocation, not a reference to a local copy.
Fields§
§address: u64Implementations§
Source§impl<T: RudaRecord> RudaReference<T>
impl<T: RudaRecord> RudaReference<T>
pub fn new(address: u64) -> Self
pub fn read(&self) -> T
pub fn write(&self, value: T)
pub fn __expand_new( scope: &mut Scope, address: <u64 as RudaType>::ExpandType, ) -> <Self as RudaType>::ExpandType
pub fn __expand_read( scope: &mut Scope, this: <Self as RudaType>::ExpandType, ) -> <T as RudaType>::ExpandType
pub fn __expand_write( scope: &mut Scope, this: <Self as RudaType>::ExpandType, value: <T as RudaType>::ExpandType, ) -> <() as RudaType>::ExpandType
Trait Implementations§
Source§impl<T: Clone + RudaRecord> Clone for RudaReference<T>
impl<T: Clone + RudaRecord> Clone for RudaReference<T>
Source§fn clone(&self) -> RudaReference<T>
fn clone(&self) -> RudaReference<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: RudaRecord, I: RudaAddress<T>> RudaRead<RudaReference<T>> for RudaReferences<T, I>
impl<T: RudaRecord, I: RudaAddress<T>> RudaRead<RudaReference<T>> for RudaReferences<T, I>
fn read(&self, index: usize) -> RudaReference<T>
fn __expand_read( scope: &mut Scope, this: <Self as RudaType>::ExpandType, index: <usize as RudaType>::ExpandType, ) -> <T as RudaType>::ExpandType
Source§impl<T: RudaRecord, I: RudaAddress<T>> RudaReadExpand<RudaReference<T>> for RudaReferencesExpand<T, I>
impl<T: RudaRecord, I: RudaAddress<T>> RudaReadExpand<RudaReference<T>> for RudaReferencesExpand<T, I>
fn __expand_read_method( self, scope: &mut Scope, index: <usize as RudaType>::ExpandType, ) -> <RudaReference<T> as RudaType>::ExpandType
Source§impl<T: RudaRecord> RudaType for RudaReference<T>
impl<T: RudaRecord> RudaType for RudaReference<T>
type ExpandType = RudaReferenceExpand<T>
Auto Trait Implementations§
impl<T> Freeze for RudaReference<T>where
PhantomData<T>: Freeze,
impl<T> RefUnwindSafe for RudaReference<T>where
PhantomData<T>: RefUnwindSafe,
impl<T> Send for RudaReference<T>where
PhantomData<T>: Send,
impl<T> Sync for RudaReference<T>where
PhantomData<T>: Sync,
impl<T> Unpin for RudaReference<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for RudaReference<T>where
PhantomData<T>: UnsafeUnpin,
impl<T> UnwindSafe for RudaReference<T>where
PhantomData<T>: UnwindSafe,
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