Struct partial_ref::Field
source · pub struct Field<FieldType: ?Sized>(_);
Expand description
Type of a part that corresponds to a struct field.
Partial references containing a part of this type provide access to that field.
Trait Implementations
sourceimpl<FieldType: ?Sized> PartType for Field<FieldType>
impl<FieldType: ?Sized> PartType for Field<FieldType>
type Ptr = *const FieldType
type Ptr = *const FieldType
Type that can be produced from a constant pointer to a reference target.
type PtrMut = *mut FieldType
type PtrMut = *mut FieldType
Type that can be produced from a mutable pointer to a reference target.
Auto Trait Implementations
impl<FieldType: ?Sized> RefUnwindSafe for Field<FieldType>where
FieldType: RefUnwindSafe,
impl<FieldType: ?Sized> Send for Field<FieldType>where
FieldType: Send,
impl<FieldType: ?Sized> Sync for Field<FieldType>where
FieldType: Sync,
impl<FieldType: ?Sized> Unpin for Field<FieldType>where
FieldType: Unpin,
impl<FieldType: ?Sized> UnwindSafe for Field<FieldType>where
FieldType: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Reference, Outer, OuterFieldType, Inner> HasPart<Nested<Outer, Inner>> for Referencewhere
Reference: HasPart<Outer> + ?Sized,
Outer: Part<PartType = Field<OuterFieldType>>,
Inner: Part,
OuterFieldType: HasPart<Inner, RawTarget = OuterFieldType> + PartialRefTarget + ?Sized,
impl<Reference, Outer, OuterFieldType, Inner> HasPart<Nested<Outer, Inner>> for Referencewhere
Reference: HasPart<Outer> + ?Sized,
Outer: Part<PartType = Field<OuterFieldType>>,
Inner: Part,
OuterFieldType: HasPart<Inner, RawTarget = OuterFieldType> + PartialRefTarget + ?Sized,
sourceunsafe fn part_ptr(
ptr: *const <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::Ptr
unsafe fn part_ptr(
ptr: *const <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::Ptr
Given a constant pointer to a target, produce a constant pointer to a part of it.
sourceunsafe fn part_ptr_mut(
ptr: *mut <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::PtrMut
unsafe fn part_ptr_mut(
ptr: *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.