Struct partial_ref::Ref

source ·
#[repr(transparent)]
pub struct Ref<'a, Target: PartialRefTarget + ?Sized> { /* private fields */ }
Expand description

An empty partial reference borrowing no parts.

Partial references with a non-empty set of borrowed parts are built by nesting this type within the Mut and Const types.

Trait Implementations

An empty reference contains no mutable parts and thus is safe to clone.

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

An empty reference to a valid target is a valid reference.

The referenced type. Read more
Create a partial reference from a raw pointer. Read more
Access to the underlying raw pointer. Read more
Partially re-borrows a partial reference. Read more
Access a part of the referenced value. Read more
Mutable access to a part of the referenced value. Read more
Partially re-borrows a partial reference, splitting off the remaining parts. Read more
Access a part of the referenced value, splitting off the remaining parts. Read more
Mutable access to a part of the referenced value, splitting off the remaining parts. Read more

An empty reference contains no mutable parts and thus is safe to clone.

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.

Given a constant pointer to a target, produce a constant pointer to a part of it.
Given a mutable pointer to a target, produce a mutable pointer to a part of it.

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.