[−][src]Struct partial_ref::Ref
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.
unsafe fn from_raw(
ptr: *mut <Self::Target as PartialRefTarget>::RawTarget
) -> Self
[src]
ptr: *mut <Self::Target as PartialRefTarget>::RawTarget
) -> Self
fn get_raw(&self) -> *mut <Self::Target as PartialRefTarget>::RawTarget
[src]
fn borrow<'b, BorrowedRef, SubsetIndex>(&'b mut self) -> BorrowedRef where
'a: 'b,
BorrowedRef: PartialRef<'a, Target = Self::Target>,
Self: HasSubset<'a, BorrowedRef, SubsetIndex>,
[src]
'a: 'b,
BorrowedRef: PartialRef<'a, Target = Self::Target>,
Self: HasSubset<'a, BorrowedRef, SubsetIndex>,
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]
&'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,
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]
&'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,
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]
&'b mut self
) -> (BorrowedRef, Self::Remainder) where
'a: 'b,
BorrowedRef: PartialRef<'a, Target = Self::Target>,
Self: HasSubset<'a, BorrowedRef, SubsetIndex>,
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]
&'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,
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]
&'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,
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]
Reference: PartialRef<'a>,
(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(&self) -> Self
[src]
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
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]
Inner: Part,
Outer: Part<PartType = Field<OuterFieldType>>,
OuterFieldType: HasPart<Inner, RawTarget = OuterFieldType> + PartialRefTarget + ?Sized,
Reference: HasPart<Outer> + ?Sized,
unsafe fn part_ptr(
*const <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::Ptr
[src]
*const <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::Ptr
unsafe fn part_ptr_mut(
*mut <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::PtrMut
[src]
*mut <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::PtrMut
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,