Struct UniqueArc

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

Trait Implementations§

Source§

impl<T: ?Sized> AsMut<T> for UniqueArc<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 UniqueArc<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 UniqueArc<T>

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

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

impl<T: Default> Default for UniqueArc<T>

Source§

fn default() -> UniqueArc<T>

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

Source§

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

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &T

Dereferences the value.
Source§

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

Source§

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

Mutably dereferences the value.
Source§

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

Source§

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

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

impl<T> From<T> for UniqueArc<T>

Source§

fn from(t: T) -> Self

Converts to this type from the input type.
Source§

impl<T: ?Sized + Hash> Hash for UniqueArc<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<Arc<T>> for UniqueArc<T>

Source§

fn into(self) -> Arc<T>

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

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

Source§

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

Comparison for two UniqueArcs.

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 UniqueArc<T>

Source§

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

Equality for two UniqueArcs.

Two UniqueArcs 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: &UniqueArc<T>) -> bool

Inequality for two Arcs.

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

Source§

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

Source§

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

Partial comparison for two UniqueArcs.

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

Source§

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

Less-than comparison for two UniqueArcs.

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

Source§

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

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

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

Source§

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

Greater-than comparison for two UniqueArcs.

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

Source§

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

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

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

Source§

impl<T: ?Sized> Pointer for UniqueArc<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 UniqueArc<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 UniqueArc<T>

Source§

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

Source§

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

Source§

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

Source§

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

Auto Trait Implementations§

§

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

§

impl<T> RefUnwindSafe for UniqueArc<T>
where T: RefUnwindSafe + ?Sized,

§

impl<T> UnwindSafe for UniqueArc<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.