UniqueArc

Struct UniqueArc 

Source
pub struct UniqueArc<T, A = Global>
where A: Allocator, T: ?Sized,
{ /* private fields */ }
🔬This is a nightly-only experimental API. (unique_rc_arc)
Expand description

A uniquely owned Arc.

This represents an Arc that is known to be uniquely owned – that is, have exactly one strong reference. Multiple weak pointers can be created, but attempts to upgrade those to strong references will fail unless the UniqueArc they point to has been converted into a regular Arc.

Because it is uniquely owned, the contents of a UniqueArc can be freely mutated. A common use case is to have an object be mutable during its initialization phase but then have it become immutable and converted to a normal Arc.

This can be used as a flexible way to create cyclic data structures, as in the example below.

#![feature(unique_rc_arc)]
use std::sync::{Arc, Weak, UniqueArc};

struct Gadget {
    me: Weak<Gadget>,
}

fn create_gadget() -> Option<Arc<Gadget>> {
    let mut rc = UniqueArc::new(Gadget {
        me: Weak::new(),
    });
    rc.me = UniqueArc::downgrade(&rc);
    Some(UniqueArc::into_arc(rc))
}

create_gadget().unwrap();

An advantage of using UniqueArc over Arc::new_cyclic to build cyclic data structures is that Arc::new_cyclic’s data_fn parameter cannot be async or return a Result. As shown in the previous example, UniqueArc allows for more flexibility in the construction of cyclic data, including fallible or async constructors.

Implementations§

Source§

impl<T> UniqueArc<T>

Source

pub fn new(value: T) -> UniqueArc<T>

🔬This is a nightly-only experimental API. (unique_rc_arc)

Creates a new UniqueArc.

Weak references to this UniqueArc can be created with UniqueArc::downgrade. Upgrading these weak references will fail before the UniqueArc has been converted into an Arc. After converting the UniqueArc into an Arc, any weak references created beforehand will point to the new Arc.

Source

pub fn map<U>(this: UniqueArc<T>, f: impl FnOnce(T) -> U) -> UniqueArc<U>

🔬This is a nightly-only experimental API. (smart_pointer_try_map)

Maps the value in a UniqueArc, reusing the allocation if possible.

f is called on a reference to the value in the UniqueArc, and the result is returned, also in a UniqueArc.

Note: this is an associated function, which means that you have to call it as UniqueArc::map(u, f) instead of u.map(f). This is so that there is no conflict with a method on the inner type.

§Examples
#![feature(smart_pointer_try_map)]
#![feature(unique_rc_arc)]

use std::sync::UniqueArc;

let r = UniqueArc::new(7);
let new = UniqueArc::map(r, |i| i + 7);
assert_eq!(*new, 14);
Source

pub fn try_map<R>( this: UniqueArc<T>, f: impl FnOnce(T) -> R, ) -> <<R as Try>::Residual as Residual<UniqueArc<<R as Try>::Output>>>::TryType
where R: Try, <R as Try>::Residual: Residual<UniqueArc<<R as Try>::Output>>,

🔬This is a nightly-only experimental API. (smart_pointer_try_map)

Attempts to map the value in a UniqueArc, reusing the allocation if possible.

f is called on a reference to the value in the UniqueArc, and if the operation succeeds, the result is returned, also in a UniqueArc.

Note: this is an associated function, which means that you have to call it as UniqueArc::try_map(u, f) instead of u.try_map(f). This is so that there is no conflict with a method on the inner type.

§Examples
#![feature(smart_pointer_try_map)]
#![feature(unique_rc_arc)]

use std::sync::UniqueArc;

let b = UniqueArc::new(7);
let new = UniqueArc::try_map(b, u32::try_from).unwrap();
assert_eq!(*new, 7);
Source§

impl<T, A> UniqueArc<T, A>
where A: Allocator,

Source

pub fn new_in(data: T, alloc: A) -> UniqueArc<T, A>

🔬This is a nightly-only experimental API. (unique_rc_arc)

Creates a new UniqueArc in the provided allocator.

Weak references to this UniqueArc can be created with UniqueArc::downgrade. Upgrading these weak references will fail before the UniqueArc has been converted into an Arc. After converting the UniqueArc into an Arc, any weak references created beforehand will point to the new Arc.

Source§

impl<T, A> UniqueArc<T, A>
where A: Allocator, T: ?Sized,

Source

pub fn into_arc(this: UniqueArc<T, A>) -> Arc<T, A>

🔬This is a nightly-only experimental API. (unique_rc_arc)

Converts the UniqueArc into a regular Arc.

This consumes the UniqueArc and returns a regular Arc that contains the value that is passed to into_arc.

Any weak references created before this method is called can now be upgraded to strong references.

Source§

impl<T, A> UniqueArc<T, A>
where A: Allocator + Clone, T: ?Sized,

Source

pub fn downgrade(this: &UniqueArc<T, A>) -> Weak<T, A>

🔬This is a nightly-only experimental API. (unique_rc_arc)

Creates a new weak reference to the UniqueArc.

Attempting to upgrade this weak reference will fail before the UniqueArc has been converted to a Arc using UniqueArc::into_arc.

Trait Implementations§

Source§

impl<T, A> AsMut<T> for UniqueArc<T, A>
where A: Allocator, T: ?Sized,

Source§

fn as_mut(&mut self) -> &mut T

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T, A> AsRef<T> for UniqueArc<T, A>
where A: Allocator, T: ?Sized,

Source§

fn as_ref(&self) -> &T

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T, A> Borrow<T> for UniqueArc<T, A>
where A: Allocator, T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T, A> BorrowMut<T> for UniqueArc<T, A>
where A: Allocator, T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, A> Debug for UniqueArc<T, A>
where T: Debug + ?Sized, A: Allocator,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T, A> Deref for UniqueArc<T, A>
where A: Allocator, T: ?Sized,

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &T

Dereferences the value.
Source§

impl<T, A> DerefMut for UniqueArc<T, A>
where A: Allocator, T: ?Sized,

Source§

fn deref_mut(&mut self) -> &mut T

Mutably dereferences the value.
Source§

impl<T, A> Display for UniqueArc<T, A>
where T: Display + ?Sized, A: Allocator,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T, A> Drop for UniqueArc<T, A>
where A: Allocator, T: ?Sized,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<T, A> Hash for UniqueArc<T, A>
where T: Hash + ?Sized, A: Allocator,

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T, A> Ord for UniqueArc<T, A>
where T: Ord + ?Sized, A: Allocator,

Source§

fn cmp(&self, other: &UniqueArc<T, A>) -> Ordering

Comparison for two UniqueArcs.

The two are compared by calling cmp() on their inner values.

§Examples
#![feature(unique_rc_arc)]
use std::sync::UniqueArc;
use std::cmp::Ordering;

let five = UniqueArc::new(5);

assert_eq!(Ordering::Less, five.cmp(&UniqueArc::new(6)));
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T, A> PartialEq for UniqueArc<T, A>
where T: PartialEq + ?Sized, A: Allocator,

Source§

fn eq(&self, other: &UniqueArc<T, A>) -> bool

Equality for two UniqueArcs.

Two UniqueArcs are equal if their inner values are equal.

§Examples
#![feature(unique_rc_arc)]
use std::sync::UniqueArc;

let five = UniqueArc::new(5);

assert!(five == UniqueArc::new(5));
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T, A> PartialOrd for UniqueArc<T, A>
where T: PartialOrd + ?Sized, A: Allocator,

Source§

fn partial_cmp(&self, other: &UniqueArc<T, A>) -> Option<Ordering>

Partial comparison for two UniqueArcs.

The two are compared by calling partial_cmp() on their inner values.

§Examples
#![feature(unique_rc_arc)]
use std::sync::UniqueArc;
use std::cmp::Ordering;

let five = UniqueArc::new(5);

assert_eq!(Some(Ordering::Less), five.partial_cmp(&UniqueArc::new(6)));
Source§

fn lt(&self, other: &UniqueArc<T, A>) -> bool

Less-than comparison for two UniqueArcs.

The two are compared by calling < on their inner values.

§Examples
#![feature(unique_rc_arc)]
use std::sync::UniqueArc;

let five = UniqueArc::new(5);

assert!(five < UniqueArc::new(6));
Source§

fn le(&self, other: &UniqueArc<T, A>) -> bool

‘Less than or equal to’ comparison for two UniqueArcs.

The two are compared by calling <= on their inner values.

§Examples
#![feature(unique_rc_arc)]
use std::sync::UniqueArc;

let five = UniqueArc::new(5);

assert!(five <= UniqueArc::new(5));
Source§

fn gt(&self, other: &UniqueArc<T, A>) -> bool

Greater-than comparison for two UniqueArcs.

The two are compared by calling > on their inner values.

§Examples
#![feature(unique_rc_arc)]
use std::sync::UniqueArc;

let five = UniqueArc::new(5);

assert!(five > UniqueArc::new(4));
Source§

fn ge(&self, other: &UniqueArc<T, A>) -> bool

‘Greater than or equal to’ comparison for two UniqueArcs.

The two are compared by calling >= on their inner values.

§Examples
#![feature(unique_rc_arc)]
use std::sync::UniqueArc;

let five = UniqueArc::new(5);

assert!(five >= UniqueArc::new(5));
Source§

impl<T, A> Pointer for UniqueArc<T, A>
where A: Allocator, T: ?Sized,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T, U, A> CoerceUnsized<UniqueArc<U, A>> for UniqueArc<T, A>
where T: Unsize<U> + ?Sized, A: Allocator, U: ?Sized,

Source§

impl<T, A> DerefPure for UniqueArc<T, A>
where A: Allocator, T: ?Sized,

Source§

impl<T, U> DispatchFromDyn<UniqueArc<U>> for UniqueArc<T>
where T: Unsize<U> + ?Sized, U: ?Sized,

Source§

impl<T, A> Eq for UniqueArc<T, A>
where T: Eq + ?Sized, A: Allocator,

Source§

impl<T> PinCoerceUnsized for UniqueArc<T>
where T: ?Sized,

Source§

impl<T, A> Send for UniqueArc<T, A>
where T: Sync + Send + ?Sized, A: Allocator + Send,

Source§

impl<T, A> Sync for UniqueArc<T, A>
where T: Sync + Send + ?Sized, A: Allocator + Sync,

Source§

impl<T, A> Unpin for UniqueArc<T, A>
where A: Allocator, T: ?Sized,

Auto Trait Implementations§

§

impl<T, A> Freeze for UniqueArc<T, A>
where A: Freeze, T: ?Sized,

§

impl<T, A> RefUnwindSafe for UniqueArc<T, A>

§

impl<T, A> UnwindSafe for UniqueArc<T, A>

Blanket Implementations§

§

impl<T, A, P> Access<T> for P
where A: Access<T> + ?Sized, P: Deref<Target = A>,

§

type Guard = <A as Access<T>>::Guard

A guard object containing the value and keeping it alive. Read more
§

fn load(&self) -> <P as Access<T>>::Guard

The loading method. Read more
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<T, A> DynAccess<T> for A
where A: Access<T>, <A as Access<T>>::Guard: 'static,

§

fn load(&self) -> DynGuard<T>

The equivalent of [Access::load].
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<K, V, T> Expiry<K, V> for T
where T: Deref<Target = dyn Expiry<K, V> + Sync + Send>,

§

fn expire_after_create( &self, key: &K, value: &V, created_at: Instant, ) -> Option<Duration>

Specifies that the entry should be automatically removed from the cache once the duration has elapsed after the entry’s creation. This method is called for cache write methods such as insert and get_with but only when the key was not present in the cache. Read more
§

fn expire_after_read( &self, key: &K, value: &V, read_at: Instant, duration_until_expiry: Option<Duration>, last_modified_at: Instant, ) -> Option<Duration>

Specifies that the entry should be automatically removed from the cache once the duration has elapsed after its last read. This method is called for cache read methods such as get and get_with but only when the key is present in the cache. Read more
§

fn expire_after_update( &self, key: &K, value: &V, updated_at: Instant, duration_until_expiry: Option<Duration>, ) -> Option<Duration>

Specifies that the entry should be automatically removed from the cache once the duration has elapsed after the replacement of its value. This method is called for cache write methods such as insert but only when the key is already present in the cache. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
§

impl<T, U> RamaFrom<T> for U
where U: From<T>,

§

fn rama_from(value: T) -> U

§

impl<T, U, CrateMarker> RamaInto<U, CrateMarker> for T
where U: RamaFrom<T, CrateMarker>,

§

fn rama_into(self) -> U

§

impl<T, U> RamaTryFrom<T> for U
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

§

fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>

§

impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for T
where U: RamaTryFrom<T, CrateMarker>,

§

type Error = <U as RamaTryFrom<T, CrateMarker>>::Error

§

fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<R> Rng for R
where R: RngCore + ?Sized,

Source§

fn random<T>(&mut self) -> T

Return a random value via the StandardUniform distribution. Read more
Source§

fn random_iter<T>(self) -> Iter<StandardUniform, Self, T> ⓘ

Return an iterator over random variates Read more
Source§

fn random_range<T, R>(&mut self, range: R) -> T
where T: SampleUniform, R: SampleRange<T>,

Generate a random value in the given range. Read more
Source§

fn random_bool(&mut self, p: f64) -> bool

Return a bool with a probability p of being true. Read more
Source§

fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool

Return a bool with a probability of numerator/denominator of being true. Read more
Source§

fn sample<T, D>(&mut self, distr: D) -> T
where D: Distribution<T>,

Sample a new value, using the given distribution. Read more
Source§

fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T> ⓘ
where D: Distribution<T>, Self: Sized,

Create an iterator that generates values using the given distribution. Read more
Source§

fn fill<T>(&mut self, dest: &mut T)
where T: Fill + ?Sized,

Fill any type implementing Fill with random data Read more
Source§

fn gen<T>(&mut self) -> T

👎Deprecated since 0.9.0: Renamed to random to avoid conflict with the new gen keyword in Rust 2024.
Alias for Rng::random.
Source§

fn gen_range<T, R>(&mut self, range: R) -> T
where T: SampleUniform, R: SampleRange<T>,

👎Deprecated since 0.9.0: Renamed to random_range
Source§

fn gen_bool(&mut self, p: f64) -> bool

👎Deprecated since 0.9.0: Renamed to random_bool
Alias for Rng::random_bool.
Source§

fn gen_ratio(&mut self, numerator: u32, denominator: u32) -> bool

👎Deprecated since 0.9.0: Renamed to random_ratio
Source§

impl<T> RngCore for T
where T: DerefMut, <T as Deref>::Target: RngCore,

Source§

fn next_u32(&mut self) -> u32

Return the next random u32. Read more
Source§

fn next_u64(&mut self) -> u64

Return the next random u64. Read more
Source§

fn fill_bytes(&mut self, dst: &mut [u8])

Fill dest with random data. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToHex for T
where T: AsRef<[u8]>,

Source§

fn encode_hex<U>(&self) -> U
where U: FromIterator<char>,

Encode the hex strict representing self into the result. Lower case letters are used (e.g. f9b4ca)
Source§

fn encode_hex_upper<U>(&self) -> U
where U: FromIterator<char>,

Encode the hex strict representing self into the result. Upper case letters are used (e.g. F9B4CA)
§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

§

fn to_smolstr(&self) -> SmolStr

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> ToStringFallible for T
where T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<R> TryRngCore for R
where R: RngCore + ?Sized,

Source§

type Error = Infallible

The type returned in the event of a RNG error.
Source§

fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>

Return the next random u32.
Source§

fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>

Return the next random u64.
Source§

fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>

Fill dest entirely with random data.
Source§

fn unwrap_err(self) -> UnwrapErr<Self>
where Self: Sized,

Wrap RNG with the UnwrapErr wrapper.
Source§

fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>

Wrap RNG with the UnwrapMut wrapper.
Source§

fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>
where Self: Sized,

Available on crate feature std only.
Convert an RngCore to a RngReadAdapter.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> CryptoRng for T
where T: DerefMut, <T as Deref>::Target: CryptoRng,

§

impl<T> Formattable for T
where T: Deref, <T as Deref>::Target: Formattable,

Source§

impl<T> NumBytes for T
where T: Debug + AsRef<[u8]> + AsMut<[u8]> + PartialEq + Eq + PartialOrd + Ord + Hash + Borrow<[u8]> + BorrowMut<[u8]> + ?Sized,

§

impl<T> Parsable for T
where T: Deref, <T as Deref>::Target: Parsable,

Source§

impl<R> TryCryptoRng for R
where R: CryptoRng + ?Sized,