pub struct Ref<'a, Target: PartialRefTarget + ?Sized> { /* private fields */ }
Expand description
Trait Implementations§
Source§impl<'a, Target: PartialRefTarget> Clone for Ref<'a, Target>
An empty reference contains no mutable parts and thus is safe to clone.
impl<'a, Target: PartialRefTarget> Clone for Ref<'a, Target>
An empty reference contains no mutable parts and thus is safe to clone.
Source§impl<'a, 'b: 'a, Target: PartialRefTarget + ?Sized> PartialRef<'a> for Ref<'b, Target>
An empty reference to a valid target is a valid reference.
impl<'a, 'b: 'a, Target: PartialRefTarget + ?Sized> PartialRef<'a> for Ref<'b, Target>
An empty reference to a valid target is a valid reference.
Source§unsafe fn from_raw(
ptr: *mut <Self::Target as PartialRefTarget>::RawTarget,
) -> Self
unsafe fn from_raw( ptr: *mut <Self::Target as PartialRefTarget>::RawTarget, ) -> Self
Create a partial reference from a raw pointer. Read more
Source§fn get_raw(&self) -> *mut <Self::Target as PartialRefTarget>::RawTarget
fn get_raw(&self) -> *mut <Self::Target as PartialRefTarget>::RawTarget
Access to the underlying raw pointer. Read more
Source§fn borrow<BorrowedRef, SubsetIndex>(&'a mut self) -> BorrowedRefwhere
BorrowedRef: PartialRef<'a, Target = Self::Target>,
Self: HasSubset<'a, BorrowedRef, SubsetIndex>,
fn borrow<BorrowedRef, SubsetIndex>(&'a mut self) -> BorrowedRefwhere
BorrowedRef: PartialRef<'a, Target = Self::Target>,
Self: HasSubset<'a, BorrowedRef, SubsetIndex>,
Partially re-borrows a partial reference. Read more
Source§fn part<FieldPartSpec, FieldPart, PartIndex, FieldType>(
&'a self,
_part: FieldPartSpec,
) -> &'a FieldType
fn part<FieldPartSpec, FieldPart, PartIndex, FieldType>( &'a self, _part: FieldPartSpec, ) -> &'a FieldType
Access a part of the referenced value. Read more
Source§fn part_mut<FieldPartSpec, FieldPart, PartIndex, FieldType>(
&'a mut self,
_part: FieldPartSpec,
) -> &'a mut FieldType
fn part_mut<FieldPartSpec, FieldPart, PartIndex, FieldType>( &'a mut self, _part: FieldPartSpec, ) -> &'a mut FieldType
Mutable access to a part of the referenced value. Read more
Source§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
Source§fn split_part<FieldPartSpec, FieldPart, PartIndex, FieldType>(
&'a mut self,
_part: FieldPartSpec,
) -> (&'a FieldType, Self::Remainder)
fn split_part<FieldPartSpec, FieldPart, PartIndex, FieldType>( &'a mut self, _part: FieldPartSpec, ) -> (&'a FieldType, Self::Remainder)
Access a part of the referenced value, splitting off the remaining parts. Read more
Source§fn split_part_mut<FieldPartSpec, FieldPart, PartIndex, FieldType>(
&'a mut self,
_part: FieldPartSpec,
) -> (&'a mut FieldType, Self::Remainder)
fn split_part_mut<FieldPartSpec, FieldPart, PartIndex, FieldType>( &'a mut self, _part: FieldPartSpec, ) -> (&'a mut FieldType, Self::Remainder)
Mutable access to a part of the referenced value, splitting off the remaining parts. Read more
impl<'a, Target: PartialRefTarget> Copy for Ref<'a, Target>
An empty reference contains no mutable parts and thus is safe to clone.
Auto Trait Implementations§
impl<'a, Target> Freeze for Ref<'a, Target>where
Target: ?Sized,
impl<'a, Target> RefUnwindSafe for Ref<'a, Target>
impl<'a, Target> !Send for Ref<'a, Target>
impl<'a, Target> !Sync for Ref<'a, Target>
impl<'a, Target> Unpin for Ref<'a, Target>where
Target: ?Sized,
impl<'a, Target> !UnwindSafe for Ref<'a, Target>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more