Struct partial_ref::Nested

source ·
pub struct Nested<Outer, Inner>(_, _);
Expand description

A nested part.

A nested part can be constructed from an outer part and an inner part. The outer part must be a Field part, and the field’s type must be a PartialRefTarget having the the inner part (HasPart).

When nesting multiple times, the nested part should always be the outer part. This isn’t enforced, but some operations are only supported in that case.

Trait Implementations

Create default values for nested parts.

These are useful as parameters to pass to PartialRef’s part functions.

The resulting type after applying the | operator.
Performs the | operation. Read more
Returns the “default value” for a type. Read more

A nested part is itself a part.

(internal) Pluck a constant nested subpart of the constant first part.

The partial reference left after plucking.

(internal) Pluck a constant nested subpart of the mutable first part.

This leaves all other subparts as mutable in the remaining reference.

The partial reference left after plucking.

(internal) Pluck a mutable nested subpart of the mutable first part.

This leaves all other subparts in the remaining reference.

The partial reference left after plucking.

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 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.