[][src]Struct partial_ref::Ref

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

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

impl<'a, Target: PartialRefTarget + ?Sized> PartialRef<'a> for Ref<'a, Target>[src]

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

type Target = Target

The referenced type.

fn borrow<'b, BorrowedRef, SubsetIndex>(&'b mut self) -> BorrowedRef where
    'a: 'b,
    BorrowedRef: PartialRef<'a, Target = Self::Target>,
    Self: HasSubset<'a, BorrowedRef, SubsetIndex>, 
[src]

Partially re-borrows a partial reference. Read more

fn part<'b, FieldPart, PartIndex, FieldType>(
    &'b mut self,
    _part: FieldPart
) -> &'a FieldType where
    'a: 'b,
    FieldType: ?Sized,
    FieldPart: Part<PartType = Field<FieldType>>,
    Self: PluckConst<'a, FieldPart, PartIndex>,
    Self::Target: HasPart<FieldPart> + 'a, 
[src]

Access a part of the referenced value. Read more

fn part_mut<'b, FieldPart, PartIndex, FieldType>(
    &'b mut self,
    _part: FieldPart
) -> &'a mut FieldType where
    'a: 'b,
    FieldType: ?Sized,
    FieldPart: Part<PartType = Field<FieldType>>,
    Self: PluckMut<'a, FieldPart, PartIndex>,
    Self::Target: HasPart<FieldPart> + 'a, 
[src]

Mutable access to a part of the referenced value. Read more

fn split_borrow<'b, BorrowedRef, SubsetIndex>(
    &'b mut self
) -> (BorrowedRef, Self::Remainder) where
    'a: 'b,
    BorrowedRef: PartialRef<'a, Target = Self::Target>,
    Self: HasSubset<'a, BorrowedRef, SubsetIndex>, 
[src]

Partially re-borrows a partial reference, splitting off the remaining parts. Read more

fn split_part<'b, FieldPart, PartIndex, FieldType>(
    &'b mut self,
    _part: FieldPart
) -> (&'a FieldType, Self::Remainder) where
    'a: 'b,
    FieldType: ?Sized,
    FieldPart: Part<PartType = Field<FieldType>>,
    Self: PluckConst<'a, FieldPart, PartIndex>,
    Self::Target: HasPart<FieldPart> + 'a, 
[src]

Access a part of the referenced value, splitting off the remaining parts. Read more

fn split_part_mut<'b, FieldPart, PartIndex, FieldType>(
    &'b mut self,
    _part: FieldPart
) -> (&'a mut FieldType, Self::Remainder) where
    'a: 'b,
    FieldType: ?Sized,
    FieldPart: Part<PartType = Field<FieldType>>,
    Self: PluckMut<'a, FieldPart, PartIndex>,
    Self::Target: HasPart<FieldPart> + 'a, 
[src]

Mutable access to a part of the referenced value, splitting off the remaining parts. Read more

impl<'a, Reference> HasSubset<'a, Ref<'a, <Reference as PartialRef<'a>>::Target>, SubsetIndexEnd> for Reference where
    Reference: PartialRef<'a>, 
[src]

(internal) Every reference has the empty reference as subset.

type Remainder = Reference

impl<'a, Target: PartialRefTarget> Clone for Ref<'a, Target>[src]

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

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a, Target: PartialRefTarget> Copy for Ref<'a, Target>[src]

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

Auto Trait Implementations

impl<'a, Target> !Send for Ref<'a, Target>

impl<'a, Target> !Sync for Ref<'a, Target>

Blanket Implementations

impl<Reference, Outer, OuterFieldType, Inner> HasPart for Reference where
    Inner: Part,
    Outer: Part<PartType = Field<OuterFieldType>>,
    OuterFieldType: HasPart<Inner, RawTarget = OuterFieldType> + PartialRefTarget + ?Sized,
    Reference: HasPart<Outer> + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

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

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

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

The type returned in the event of a conversion error.