pub struct SafeRc<T: SafeDelete + ?Sized>(/* private fields */);
Expand description
Rc
-like object with a linear drop.
Allows to build a deeply nested data without causing a stack overflow.
Implementations§
Source§impl<T: SafeDelete> SafeRc<T>
impl<T: SafeDelete> SafeRc<T>
pub fn new(value: T) -> Self
pub fn try_unwrap(this: Self) -> Result<T, Self>
Source§impl<T: SafeDelete + ?Sized> SafeRc<T>
impl<T: SafeDelete + ?Sized> SafeRc<T>
Source§impl<T: SafeDelete + Clone> SafeRc<T>
impl<T: SafeDelete + Clone> SafeRc<T>
pub fn unwrap_or_clone(this: Self) -> T
Source§impl SafeRc<dyn StackValue>
impl SafeRc<dyn StackValue>
pub fn new_dyn_value<T: StackValue + 'static>(value: T) -> Self
pub fn into_int(self) -> VmResult<SafeRc<BigInt>>
pub fn into_cell(self) -> VmResult<SafeRc<Cell>>
pub fn into_cell_slice(self) -> VmResult<SafeRc<OwnedCellSlice>>
pub fn into_cell_builder(self) -> VmResult<SafeRc<CellBuilder>>
pub fn into_cont(self) -> VmResult<SafeRc<dyn Cont>>
pub fn into_tuple(self) -> VmResult<SafeRc<Tuple>>
Source§impl<T: StackValue + ?Sized> SafeRc<T>
impl<T: StackValue + ?Sized> SafeRc<T>
pub fn into_dyn_value(self) -> RcStackValue
Trait Implementations§
Source§impl<T: SafeDelete> From<T> for SafeRc<T>
impl<T: SafeDelete> From<T> for SafeRc<T>
Source§impl FromIterator<SafeRc<dyn StackValue>> for Stack
impl FromIterator<SafeRc<dyn StackValue>> for Stack
Source§fn from_iter<T: IntoIterator<Item = RcStackValue>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = RcStackValue>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl<T: Ord + SafeDelete + ?Sized> Ord for SafeRc<T>
impl<T: Ord + SafeDelete + ?Sized> Ord for SafeRc<T>
Source§impl<T: PartialOrd + SafeDelete + ?Sized> PartialOrd for SafeRc<T>
impl<T: PartialOrd + SafeDelete + ?Sized> PartialOrd for SafeRc<T>
Source§impl<T: Store + SafeDelete + ?Sized> Store for SafeRc<T>
impl<T: Store + SafeDelete + ?Sized> Store for SafeRc<T>
Source§fn store_into(
&self,
b: &mut CellBuilder,
c: &dyn CellContext,
) -> Result<(), Error>
fn store_into( &self, b: &mut CellBuilder, c: &dyn CellContext, ) -> Result<(), Error>
Tries to store itself into the cell builder.
impl<T: Eq + SafeDelete + ?Sized> Eq for SafeRc<T>
Auto Trait Implementations§
impl<T> Freeze for SafeRc<T>where
T: ?Sized,
impl<T> RefUnwindSafe for SafeRc<T>where
T: RefUnwindSafe + ?Sized,
impl<T> !Send for SafeRc<T>
impl<T> !Sync for SafeRc<T>
impl<T> Unpin for SafeRc<T>where
T: ?Sized,
impl<T> UnwindSafe for SafeRc<T>where
T: RefUnwindSafe + ?Sized,
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