Struct sodium_rust::CellLoop

source ·
pub struct CellLoop<A> { /* private fields */ }
Expand description

A forward reference for a Cell for creating dependency loops.

Both the creation of a CellLoop and filling it with the referenced Cell by calling loop_ must occur within the same transaction, whether that is created by calling SodiumCtx::transaction or Transaction::new.

Implementations§

Create a new CellLoop in the given context.

Return a Cell that is equivalent to this CellLoop once it has been resolved by calling loop_.

If a Cell created by CellLoop may be passed to an abstraction that uses Cell::sample, then Cell::sample_lazy should be used instead.

Resolve the loop to specify what this CellLoop was a forward reference to.

This function must be invoked in the same transaction as the place where the CellLoop was created. This requires creating an explicit transaction, either with SodiumCtx::transaction or Transaction::new.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.