Struct UniqueRc

Source
pub struct UniqueRc<T: ?Sized>(/* private fields */);

Trait Implementations§

Source§

impl<T: ?Sized> AsMut<T> for UniqueRc<T>

Source§

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

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

impl<T: ?Sized> AsRef<T> for UniqueRc<T>

Source§

fn as_ref(&self) -> &T

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

impl<T: ?Sized> Borrow<T> for UniqueRc<T>

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T: ?Sized> BorrowMut<T> for UniqueRc<T>

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T: ?Sized + Debug> Debug for UniqueRc<T>

Source§

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

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

impl<T: Default> Default for UniqueRc<T>

Source§

fn default() -> UniqueRc<T>

Creates a new UniqueRc<T>, with the Default value for T.

Source§

impl<T: ?Sized> Deref for UniqueRc<T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &T

Dereferences the value.
Source§

impl<T: ?Sized> DerefMut for UniqueRc<T>

Source§

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

Mutably dereferences the value.
Source§

impl<T: ?Sized + Display> Display for UniqueRc<T>

Source§

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

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

impl<T> From<T> for UniqueRc<T>

Source§

fn from(t: T) -> Self

Converts to this type from the input type.
Source§

impl<T: ?Sized + Hash> Hash for UniqueRc<T>

Source§

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

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: ?Sized> Into<Rc<T>> for UniqueRc<T>

Source§

fn into(self) -> Rc<T>

Converts this type into the (usually inferred) input type.
Source§

impl<T: ?Sized + Ord> Ord for UniqueRc<T>

Source§

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

Comparison for two UniqueRcs.

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

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: ?Sized + PartialEq> PartialEq for UniqueRc<T>

Source§

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

Equality for two UniqueRcs.

Two UniqueRcs are equal if their inner values are equal, even if they are stored in different allocation. This implementation does not check for pointer equality.

Source§

fn ne(&self, other: &UniqueRc<T>) -> bool

Inequality for two Rcs.

Two Rcs are unequal if their inner values are unequal. This implementation does not check for pointer equality.

Source§

impl<T: ?Sized + PartialOrd> PartialOrd for UniqueRc<T>

Source§

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

Partial comparison for two UniqueRcs.

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

Source§

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

Less-than comparison for two UniqueRcs.

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

Source§

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

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

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

Source§

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

Greater-than comparison for two UniqueRcs.

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

Source§

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

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

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

Source§

impl<T: ?Sized> Pointer for UniqueRc<T>

Source§

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

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

impl<T: ?Sized> SmartPointer<T> for UniqueRc<T>

Source§

fn new(data: T) -> Self
where T: Sized,

Construct a new smart pointer, containing the given value.
Source§

fn try_unwrap(this: Self) -> Result<T, Self>
where T: Sized,

Try to obtain ownership of the wrapped value. Read more
Source§

fn ptr_eq(a: Self, b: Self) -> bool

Returns whether two smart pointers point to the same location in memory. Read more
Source§

impl<T: ?Sized + Eq> Eq for UniqueRc<T>

Source§

impl<T: ?Sized + Sync + Send> Send for UniqueRc<T>

Source§

impl<T: ?Sized> SmartPointerMut<T> for UniqueRc<T>

Source§

impl<T: ?Sized + Sync + Send> Sync for UniqueRc<T>

Source§

impl<T: ?Sized> Unpin for UniqueRc<T>

Auto Trait Implementations§

§

impl<T> Freeze for UniqueRc<T>
where T: ?Sized,

§

impl<T> !RefUnwindSafe for UniqueRc<T>

§

impl<T> !UnwindSafe for UniqueRc<T>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
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
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<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<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.