[−][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> HasTarget for Ref<'a, Target>
[src]
type Target = Target
The referenced type.
impl<'a, 'b: 'a, Target: PartialRefTarget + ?Sized> PartialRef<'a> for Ref<'b, Target>
[src]
An empty reference to a valid target is a valid reference.
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<BorrowedRef, SubsetIndex>(&'a mut self) -> BorrowedRef where
BorrowedRef: PartialRef<'a, Target = Self::Target>,
Self: HasSubset<'a, BorrowedRef, SubsetIndex>,
[src]
BorrowedRef: PartialRef<'a, Target = Self::Target>,
Self: HasSubset<'a, BorrowedRef, SubsetIndex>,
Partially re-borrows a partial reference. Read more
fn part<FieldPart, PartIndex, FieldType>(
&'a self,
_part: FieldPart
) -> &'a FieldType where
FieldType: ?Sized,
FieldPart: Part<PartType = Field<FieldType>>,
Self: PluckConst<'a, FieldPart, PartIndex>,
Self::Target: HasPart<FieldPart> + 'a,
[src]
&'a self,
_part: FieldPart
) -> &'a FieldType where
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<FieldPart, PartIndex, FieldType>(
&'a mut self,
_part: FieldPart
) -> &'a mut FieldType where
FieldType: ?Sized,
FieldPart: Part<PartType = Field<FieldType>>,
Self: PluckMut<'a, FieldPart, PartIndex>,
Self::Target: HasPart<FieldPart> + 'a,
[src]
&'a mut self,
_part: FieldPart
) -> &'a mut FieldType where
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<BorrowedRef, SubsetIndex>(
&'a mut self
) -> (BorrowedRef, Self::Remainder) where
BorrowedRef: PartialRef<'a, Target = Self::Target>,
Self: HasSubset<'a, BorrowedRef, SubsetIndex>,
[src]
&'a mut self
) -> (BorrowedRef, Self::Remainder) where
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<FieldPart, PartIndex, FieldType>(
&'a mut self,
_part: FieldPart
) -> (&'a FieldType, Self::Remainder) where
FieldType: ?Sized,
FieldPart: Part<PartType = Field<FieldType>>,
Self: PluckConst<'a, FieldPart, PartIndex>,
Self::Target: HasPart<FieldPart> + 'a,
[src]
&'a mut self,
_part: FieldPart
) -> (&'a FieldType, Self::Remainder) where
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<FieldPart, PartIndex, FieldType>(
&'a mut self,
_part: FieldPart
) -> (&'a mut FieldType, Self::Remainder) where
FieldType: ?Sized,
FieldPart: Part<PartType = Field<FieldType>>,
Self: PluckMut<'a, FieldPart, PartIndex>,
Self::Target: HasPart<FieldPart> + 'a,
[src]
&'a mut self,
_part: FieldPart
) -> (&'a mut FieldType, Self::Remainder) where
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 HasTarget>::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, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
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 = Infallible
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> 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,