Struct partial_ref::Ref [−][src]
#[repr(transparent)]pub struct Ref<'a, Target: PartialRefTarget + ?Sized> { /* fields omitted */ }
Expand description
Trait Implementations
An empty reference contains no mutable parts and thus is safe to clone.
impl<'a, Reference> HasSubset<'a, Ref<'a, <Reference as HasTarget>::Target>, SubsetIndexEnd> for Reference where
Reference: PartialRef<'a>,
impl<'a, Reference> HasSubset<'a, Ref<'a, <Reference as HasTarget>::Target>, SubsetIndexEnd> for Reference where
Reference: PartialRef<'a>,
(internal) Every reference has the empty reference as subset.
type Remainder = Reference
An empty reference to a valid target is a valid reference.
Create a partial reference from a raw pointer. Read more
Access to the underlying raw pointer. Read more
fn borrow<BorrowedRef, SubsetIndex>(&'a mut self) -> BorrowedRef where
BorrowedRef: PartialRef<'a, Target = Self::Target>,
Self: HasSubset<'a, BorrowedRef, SubsetIndex>,
fn borrow<BorrowedRef, SubsetIndex>(&'a mut self) -> BorrowedRef where
BorrowedRef: PartialRef<'a, Target = Self::Target>,
Self: HasSubset<'a, BorrowedRef, SubsetIndex>,
Partially re-borrows a partial reference. Read more
Access a part of the referenced value. Read more
fn part_mut<FieldPartSpec, FieldPart, PartIndex, FieldType>(
&'a mut self,
_part: FieldPartSpec
) -> &'a mut FieldType where
FieldType: ?Sized,
FieldPart: Part<PartType = Field<FieldType>>,
FieldPartSpec: PartSpec<FieldPart>,
Self: PluckMut<'a, FieldPart, PartIndex>,
Self::Target: HasPart<FieldPart> + 'a,
fn part_mut<FieldPartSpec, FieldPart, PartIndex, FieldType>(
&'a mut self,
_part: FieldPartSpec
) -> &'a mut FieldType where
FieldType: ?Sized,
FieldPart: Part<PartType = Field<FieldType>>,
FieldPartSpec: PartSpec<FieldPart>,
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>,
fn split_borrow<BorrowedRef, SubsetIndex>(
&'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<FieldPartSpec, FieldPart, PartIndex, FieldType>(
&'a mut self,
_part: FieldPartSpec
) -> (&'a FieldType, Self::Remainder) where
FieldType: ?Sized,
FieldPart: Part<PartType = Field<FieldType>>,
FieldPartSpec: PartSpec<FieldPart>,
Self: PluckConst<'a, FieldPart, PartIndex>,
Self::Target: HasPart<FieldPart> + 'a,
fn split_part<FieldPartSpec, FieldPart, PartIndex, FieldType>(
&'a mut self,
_part: FieldPartSpec
) -> (&'a FieldType, Self::Remainder) where
FieldType: ?Sized,
FieldPart: Part<PartType = Field<FieldType>>,
FieldPartSpec: PartSpec<FieldPart>,
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<FieldPartSpec, FieldPart, PartIndex, FieldType>(
&'a mut self,
_part: FieldPartSpec
) -> (&'a mut FieldType, Self::Remainder) where
FieldType: ?Sized,
FieldPart: Part<PartType = Field<FieldType>>,
FieldPartSpec: PartSpec<FieldPart>,
Self: PluckMut<'a, FieldPart, PartIndex>,
Self::Target: HasPart<FieldPart> + 'a,
fn split_part_mut<FieldPartSpec, FieldPart, PartIndex, FieldType>(
&'a mut self,
_part: FieldPartSpec
) -> (&'a mut FieldType, Self::Remainder) where
FieldType: ?Sized,
FieldPart: Part<PartType = Field<FieldType>>,
FieldPartSpec: PartSpec<FieldPart>,
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
An empty reference contains no mutable parts and thus is safe to clone.
Auto Trait Implementations
impl<'a, Target: ?Sized> RefUnwindSafe for Ref<'a, Target> where
Target: RefUnwindSafe,
<Target as PartialRefTarget>::RawTarget: RefUnwindSafe,
impl<'a, Target> !UnwindSafe for Ref<'a, Target>
Blanket Implementations
Mutably borrows from an owned value. Read more
Given a constant pointer to a target, produce a constant pointer to a part of it. Read more
pub unsafe fn part_ptr_mut(
*mut <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::PtrMut
pub unsafe fn part_ptr_mut(
*mut <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::PtrMut
Given a mutable pointer to a target, produce a mutable pointer to a part of it. Read more
impl<'a, Reference> HasSubset<'a, Ref<'a, <Reference as HasTarget>::Target>, SubsetIndexEnd> for Reference where
Reference: PartialRef<'a>,
impl<'a, Reference> HasSubset<'a, Ref<'a, <Reference as HasTarget>::Target>, SubsetIndexEnd> for Reference where
Reference: PartialRef<'a>,
type Remainder = Reference
impl<'a, Reference> HasSubset<'a, Ref<'a, <Reference as HasTarget>::Target>, SubsetIndexEnd> for Reference where
Reference: PartialRef<'a>,
impl<'a, Reference> HasSubset<'a, Ref<'a, <Reference as HasTarget>::Target>, SubsetIndexEnd> for Reference where
Reference: PartialRef<'a>,
type Remainder = Reference