[][src]Struct structural::type_level::field_path::FieldPathSet

pub struct FieldPathSet<T, U>(_);

A list of FieldPaths whose uniqueness is determined by U.

If U=UniquePaths then all the FieldPaths are unique, and this can be passed to GetFieldExt::fields_mut, since you can't have aliasing mutable references to the same field.

If U=AliasedPaths then there might be repeated FieldPaths, and this cannot be passed to GetFieldExt::fields_mut, because it might borrow the same field mutably twice.

Methods

impl<T> FieldPathSet<T, UniquePaths>[src]

pub const unsafe fn new() -> Self[src]

Constructs a FieldPathSet.

Safety

T must be a tuple of FieldPaths<_>s, where none of them is a subset of each other.

pub const fn downgrade(self) -> FieldPathSet<T, AliasedPaths>[src]

Converts a FieldPathSet<T,UniquePaths> to a FieldPathSet<T,AliasedPaths>

impl<T> FieldPathSet<T, AliasedPaths>[src]

pub const fn new() -> Self[src]

Constructs a FieldPathSet.

pub const unsafe fn upgrade_unchecked(self) -> FieldPathSet<T, UniquePaths>[src]

Converts a FieldPathSet<T,AliasedPaths> to a FieldPathSet<T,UniquePaths>

Safety

You must ensure that all the FieldPaths are unique, there must be no FieldPath that is a prefix of any other FieldPath.

impl<T, U> FieldPathSet<(FieldPath<T>,), U>[src]

pub const fn to_path(self) -> FieldPath<T>[src]

Converts a FieldPathSet containing a single FieldPath into that FieldPath.

impl<T, U> FieldPathSet<T, U>[src]

pub fn push<O, Out>(self, _other: O) -> FieldPathSet<Out, AliasedPaths> where
    Self: PushBack_<O, Output = FieldPathSet<Out, AliasedPaths>>, 
[src]

Constructs a new FieldPathSet with _other appended at the end.

Currently this accepts:

  • A FieldPath (ie:fp!(a)/fp!(foo)/fp!(bar))

  • A FieldPathSet containing a single FieldPath (ie:fp!(a).to_set()/fp!(foo).to_set()/fp!(bar).to_set())

pub fn append<T2, U2>(
    self,
    _other: FieldPathSet<T2, U2>
) -> FieldPathSet<Append<T, T2>, AliasedPaths> where
    T: Append_<T2>, 
[src]

Constructs a new FieldPathSet with the _other FieldPathSet appended at the end.

Trait Implementations

impl<'a, This: ?Sized, U> RevGetField<'a, This> for FieldPathSet<(), U>[src]

type Field = ()

The reference-containing type this returns.

impl<'a, This: ?Sized, F0, T0, U> RevGetField<'a, This> for FieldPathSet<(FieldPath<F0>,), U> where
    FieldPath<F0>: RevGetField<'a, This, Field = &'a T0>,
    T0: 'a, 
[src]

type Field = (&'a T0,)

The reference-containing type this returns.

impl<'a, This: ?Sized, F0, F1, T0, T1, U> RevGetField<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>), U> where
    FieldPath<F0>: RevGetField<'a, This, Field = &'a T0>,
    T0: 'a,
    FieldPath<F1>: RevGetField<'a, This, Field = &'a T1>,
    T1: 'a, 
[src]

type Field = (&'a T0, &'a T1)

The reference-containing type this returns.

impl<'a, This: ?Sized, F0, F1, F2, T0, T1, T2, U> RevGetField<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>, FieldPath<F2>), U> where
    FieldPath<F0>: RevGetField<'a, This, Field = &'a T0>,
    T0: 'a,
    FieldPath<F1>: RevGetField<'a, This, Field = &'a T1>,
    T1: 'a,
    FieldPath<F2>: RevGetField<'a, This, Field = &'a T2>,
    T2: 'a, 
[src]

type Field = (&'a T0, &'a T1, &'a T2)

The reference-containing type this returns.

impl<'a, This: ?Sized, F0, F1, F2, F3, T0, T1, T2, T3, U> RevGetField<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>, FieldPath<F2>, FieldPath<F3>), U> where
    FieldPath<F0>: RevGetField<'a, This, Field = &'a T0>,
    T0: 'a,
    FieldPath<F1>: RevGetField<'a, This, Field = &'a T1>,
    T1: 'a,
    FieldPath<F2>: RevGetField<'a, This, Field = &'a T2>,
    T2: 'a,
    FieldPath<F3>: RevGetField<'a, This, Field = &'a T3>,
    T3: 'a, 
[src]

type Field = (&'a T0, &'a T1, &'a T2, &'a T3)

The reference-containing type this returns.

impl<'a, This: ?Sized, F0, F1, F2, F3, F4, T0, T1, T2, T3, T4, U> RevGetField<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>, FieldPath<F2>, FieldPath<F3>, FieldPath<F4>), U> where
    FieldPath<F0>: RevGetField<'a, This, Field = &'a T0>,
    T0: 'a,
    FieldPath<F1>: RevGetField<'a, This, Field = &'a T1>,
    T1: 'a,
    FieldPath<F2>: RevGetField<'a, This, Field = &'a T2>,
    T2: 'a,
    FieldPath<F3>: RevGetField<'a, This, Field = &'a T3>,
    T3: 'a,
    FieldPath<F4>: RevGetField<'a, This, Field = &'a T4>,
    T4: 'a, 
[src]

type Field = (&'a T0, &'a T1, &'a T2, &'a T3, &'a T4)

The reference-containing type this returns.

impl<'a, This: ?Sized, F0, F1, F2, F3, F4, F5, T0, T1, T2, T3, T4, T5, U> RevGetField<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>, FieldPath<F2>, FieldPath<F3>, FieldPath<F4>, FieldPath<F5>), U> where
    FieldPath<F0>: RevGetField<'a, This, Field = &'a T0>,
    T0: 'a,
    FieldPath<F1>: RevGetField<'a, This, Field = &'a T1>,
    T1: 'a,
    FieldPath<F2>: RevGetField<'a, This, Field = &'a T2>,
    T2: 'a,
    FieldPath<F3>: RevGetField<'a, This, Field = &'a T3>,
    T3: 'a,
    FieldPath<F4>: RevGetField<'a, This, Field = &'a T4>,
    T4: 'a,
    FieldPath<F5>: RevGetField<'a, This, Field = &'a T5>,
    T5: 'a, 
[src]

type Field = (&'a T0, &'a T1, &'a T2, &'a T3, &'a T4, &'a T5)

The reference-containing type this returns.

impl<'a, This: ?Sized, F0, F1, F2, F3, F4, F5, F6, T0, T1, T2, T3, T4, T5, T6, U> RevGetField<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>, FieldPath<F2>, FieldPath<F3>, FieldPath<F4>, FieldPath<F5>, FieldPath<F6>), U> where
    FieldPath<F0>: RevGetField<'a, This, Field = &'a T0>,
    T0: 'a,
    FieldPath<F1>: RevGetField<'a, This, Field = &'a T1>,
    T1: 'a,
    FieldPath<F2>: RevGetField<'a, This, Field = &'a T2>,
    T2: 'a,
    FieldPath<F3>: RevGetField<'a, This, Field = &'a T3>,
    T3: 'a,
    FieldPath<F4>: RevGetField<'a, This, Field = &'a T4>,
    T4: 'a,
    FieldPath<F5>: RevGetField<'a, This, Field = &'a T5>,
    T5: 'a,
    FieldPath<F6>: RevGetField<'a, This, Field = &'a T6>,
    T6: 'a, 
[src]

type Field = (&'a T0, &'a T1, &'a T2, &'a T3, &'a T4, &'a T5, &'a T6)

The reference-containing type this returns.

impl<'a, This: ?Sized, F0, F1, F2, F3, F4, F5, F6, F7, T0, T1, T2, T3, T4, T5, T6, T7, U> RevGetField<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>, FieldPath<F2>, FieldPath<F3>, FieldPath<F4>, FieldPath<F5>, FieldPath<F6>, FieldPath<F7>), U> where
    FieldPath<F0>: RevGetField<'a, This, Field = &'a T0>,
    T0: 'a,
    FieldPath<F1>: RevGetField<'a, This, Field = &'a T1>,
    T1: 'a,
    FieldPath<F2>: RevGetField<'a, This, Field = &'a T2>,
    T2: 'a,
    FieldPath<F3>: RevGetField<'a, This, Field = &'a T3>,
    T3: 'a,
    FieldPath<F4>: RevGetField<'a, This, Field = &'a T4>,
    T4: 'a,
    FieldPath<F5>: RevGetField<'a, This, Field = &'a T5>,
    T5: 'a,
    FieldPath<F6>: RevGetField<'a, This, Field = &'a T6>,
    T6: 'a,
    FieldPath<F7>: RevGetField<'a, This, Field = &'a T7>,
    T7: 'a, 
[src]

type Field = (&'a T0, &'a T1, &'a T2, &'a T3, &'a T4, &'a T5, &'a T6, &'a T7)

The reference-containing type this returns.

impl<'a, This: ?Sized> RevGetFieldMut<'a, This> for FieldPathSet<(), UniquePaths>[src]

type Field = ()

The mutable-reference-containing type this returns.

type FieldMutRef = ()

The MUtRef-containing type this returns.

impl<'a, This: ?Sized, F0, T0> RevGetFieldMut<'a, This> for FieldPathSet<(FieldPath<F0>,), UniquePaths> where
    FieldPath<F0>: RevGetFieldMut<'a, This, Field = &'a mut T0, FieldMutRef = MutRef<'a, T0>>,
    T0: 'a, 
[src]

type Field = (&'a mut T0,)

The mutable-reference-containing type this returns.

type FieldMutRef = (MutRef<'a, T0>,)

The MUtRef-containing type this returns.

impl<'a, This: ?Sized, F0, F1, T0, T1> RevGetFieldMut<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>), UniquePaths> where
    FieldPath<F0>: RevGetFieldMut<'a, This, Field = &'a mut T0, FieldMutRef = MutRef<'a, T0>>,
    T0: 'a,
    FieldPath<F1>: RevGetFieldMut<'a, This, Field = &'a mut T1, FieldMutRef = MutRef<'a, T1>>,
    T1: 'a, 
[src]

type Field = (&'a mut T0, &'a mut T1)

The mutable-reference-containing type this returns.

type FieldMutRef = (MutRef<'a, T0>, MutRef<'a, T1>)

The MUtRef-containing type this returns.

impl<'a, This: ?Sized, F0, F1, F2, T0, T1, T2> RevGetFieldMut<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>, FieldPath<F2>), UniquePaths> where
    FieldPath<F0>: RevGetFieldMut<'a, This, Field = &'a mut T0, FieldMutRef = MutRef<'a, T0>>,
    T0: 'a,
    FieldPath<F1>: RevGetFieldMut<'a, This, Field = &'a mut T1, FieldMutRef = MutRef<'a, T1>>,
    T1: 'a,
    FieldPath<F2>: RevGetFieldMut<'a, This, Field = &'a mut T2, FieldMutRef = MutRef<'a, T2>>,
    T2: 'a, 
[src]

type Field = (&'a mut T0, &'a mut T1, &'a mut T2)

The mutable-reference-containing type this returns.

type FieldMutRef = (MutRef<'a, T0>, MutRef<'a, T1>, MutRef<'a, T2>)

The MUtRef-containing type this returns.

impl<'a, This: ?Sized, F0, F1, F2, F3, T0, T1, T2, T3> RevGetFieldMut<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>, FieldPath<F2>, FieldPath<F3>), UniquePaths> where
    FieldPath<F0>: RevGetFieldMut<'a, This, Field = &'a mut T0, FieldMutRef = MutRef<'a, T0>>,
    T0: 'a,
    FieldPath<F1>: RevGetFieldMut<'a, This, Field = &'a mut T1, FieldMutRef = MutRef<'a, T1>>,
    T1: 'a,
    FieldPath<F2>: RevGetFieldMut<'a, This, Field = &'a mut T2, FieldMutRef = MutRef<'a, T2>>,
    T2: 'a,
    FieldPath<F3>: RevGetFieldMut<'a, This, Field = &'a mut T3, FieldMutRef = MutRef<'a, T3>>,
    T3: 'a, 
[src]

type Field = (&'a mut T0, &'a mut T1, &'a mut T2, &'a mut T3)

The mutable-reference-containing type this returns.

type FieldMutRef = (MutRef<'a, T0>, MutRef<'a, T1>, MutRef<'a, T2>, MutRef<'a, T3>)

The MUtRef-containing type this returns.

impl<'a, This: ?Sized, F0, F1, F2, F3, F4, T0, T1, T2, T3, T4> RevGetFieldMut<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>, FieldPath<F2>, FieldPath<F3>, FieldPath<F4>), UniquePaths> where
    FieldPath<F0>: RevGetFieldMut<'a, This, Field = &'a mut T0, FieldMutRef = MutRef<'a, T0>>,
    T0: 'a,
    FieldPath<F1>: RevGetFieldMut<'a, This, Field = &'a mut T1, FieldMutRef = MutRef<'a, T1>>,
    T1: 'a,
    FieldPath<F2>: RevGetFieldMut<'a, This, Field = &'a mut T2, FieldMutRef = MutRef<'a, T2>>,
    T2: 'a,
    FieldPath<F3>: RevGetFieldMut<'a, This, Field = &'a mut T3, FieldMutRef = MutRef<'a, T3>>,
    T3: 'a,
    FieldPath<F4>: RevGetFieldMut<'a, This, Field = &'a mut T4, FieldMutRef = MutRef<'a, T4>>,
    T4: 'a, 
[src]

type Field = (&'a mut T0, &'a mut T1, &'a mut T2, &'a mut T3, &'a mut T4)

The mutable-reference-containing type this returns.

type FieldMutRef = (MutRef<'a, T0>, MutRef<'a, T1>, MutRef<'a, T2>, MutRef<'a, T3>, MutRef<'a, T4>)

The MUtRef-containing type this returns.

impl<'a, This: ?Sized, F0, F1, F2, F3, F4, F5, T0, T1, T2, T3, T4, T5> RevGetFieldMut<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>, FieldPath<F2>, FieldPath<F3>, FieldPath<F4>, FieldPath<F5>), UniquePaths> where
    FieldPath<F0>: RevGetFieldMut<'a, This, Field = &'a mut T0, FieldMutRef = MutRef<'a, T0>>,
    T0: 'a,
    FieldPath<F1>: RevGetFieldMut<'a, This, Field = &'a mut T1, FieldMutRef = MutRef<'a, T1>>,
    T1: 'a,
    FieldPath<F2>: RevGetFieldMut<'a, This, Field = &'a mut T2, FieldMutRef = MutRef<'a, T2>>,
    T2: 'a,
    FieldPath<F3>: RevGetFieldMut<'a, This, Field = &'a mut T3, FieldMutRef = MutRef<'a, T3>>,
    T3: 'a,
    FieldPath<F4>: RevGetFieldMut<'a, This, Field = &'a mut T4, FieldMutRef = MutRef<'a, T4>>,
    T4: 'a,
    FieldPath<F5>: RevGetFieldMut<'a, This, Field = &'a mut T5, FieldMutRef = MutRef<'a, T5>>,
    T5: 'a, 
[src]

type Field = (&'a mut T0, &'a mut T1, &'a mut T2, &'a mut T3, &'a mut T4, &'a mut T5)

The mutable-reference-containing type this returns.

type FieldMutRef = (MutRef<'a, T0>, MutRef<'a, T1>, MutRef<'a, T2>, MutRef<'a, T3>, MutRef<'a, T4>, MutRef<'a, T5>)

The MUtRef-containing type this returns.

impl<'a, This: ?Sized, F0, F1, F2, F3, F4, F5, F6, T0, T1, T2, T3, T4, T5, T6> RevGetFieldMut<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>, FieldPath<F2>, FieldPath<F3>, FieldPath<F4>, FieldPath<F5>, FieldPath<F6>), UniquePaths> where
    FieldPath<F0>: RevGetFieldMut<'a, This, Field = &'a mut T0, FieldMutRef = MutRef<'a, T0>>,
    T0: 'a,
    FieldPath<F1>: RevGetFieldMut<'a, This, Field = &'a mut T1, FieldMutRef = MutRef<'a, T1>>,
    T1: 'a,
    FieldPath<F2>: RevGetFieldMut<'a, This, Field = &'a mut T2, FieldMutRef = MutRef<'a, T2>>,
    T2: 'a,
    FieldPath<F3>: RevGetFieldMut<'a, This, Field = &'a mut T3, FieldMutRef = MutRef<'a, T3>>,
    T3: 'a,
    FieldPath<F4>: RevGetFieldMut<'a, This, Field = &'a mut T4, FieldMutRef = MutRef<'a, T4>>,
    T4: 'a,
    FieldPath<F5>: RevGetFieldMut<'a, This, Field = &'a mut T5, FieldMutRef = MutRef<'a, T5>>,
    T5: 'a,
    FieldPath<F6>: RevGetFieldMut<'a, This, Field = &'a mut T6, FieldMutRef = MutRef<'a, T6>>,
    T6: 'a, 
[src]

type Field = (&'a mut T0, &'a mut T1, &'a mut T2, &'a mut T3, &'a mut T4, &'a mut T5, &'a mut T6)

The mutable-reference-containing type this returns.

type FieldMutRef = (MutRef<'a, T0>, MutRef<'a, T1>, MutRef<'a, T2>, MutRef<'a, T3>, MutRef<'a, T4>, MutRef<'a, T5>, MutRef<'a, T6>)

The MUtRef-containing type this returns.

impl<'a, This: ?Sized, F0, F1, F2, F3, F4, F5, F6, F7, T0, T1, T2, T3, T4, T5, T6, T7> RevGetFieldMut<'a, This> for FieldPathSet<(FieldPath<F0>, FieldPath<F1>, FieldPath<F2>, FieldPath<F3>, FieldPath<F4>, FieldPath<F5>, FieldPath<F6>, FieldPath<F7>), UniquePaths> where
    FieldPath<F0>: RevGetFieldMut<'a, This, Field = &'a mut T0, FieldMutRef = MutRef<'a, T0>>,
    T0: 'a,
    FieldPath<F1>: RevGetFieldMut<'a, This, Field = &'a mut T1, FieldMutRef = MutRef<'a, T1>>,
    T1: 'a,
    FieldPath<F2>: RevGetFieldMut<'a, This, Field = &'a mut T2, FieldMutRef = MutRef<'a, T2>>,
    T2: 'a,
    FieldPath<F3>: RevGetFieldMut<'a, This, Field = &'a mut T3, FieldMutRef = MutRef<'a, T3>>,
    T3: 'a,
    FieldPath<F4>: RevGetFieldMut<'a, This, Field = &'a mut T4, FieldMutRef = MutRef<'a, T4>>,
    T4: 'a,
    FieldPath<F5>: RevGetFieldMut<'a, This, Field = &'a mut T5, FieldMutRef = MutRef<'a, T5>>,
    T5: 'a,
    FieldPath<F6>: RevGetFieldMut<'a, This, Field = &'a mut T6, FieldMutRef = MutRef<'a, T6>>,
    T6: 'a,
    FieldPath<F7>: RevGetFieldMut<'a, This, Field = &'a mut T7, FieldMutRef = MutRef<'a, T7>>,
    T7: 'a, 
[src]

type Field = (&'a mut T0, &'a mut T1, &'a mut T2, &'a mut T3, &'a mut T4, &'a mut T5, &'a mut T6, &'a mut T7)

The mutable-reference-containing type this returns.

type FieldMutRef = (MutRef<'a, T0>, MutRef<'a, T1>, MutRef<'a, T2>, MutRef<'a, T3>, MutRef<'a, T4>, MutRef<'a, T5>, MutRef<'a, T6>, MutRef<'a, T7>)

The MUtRef-containing type this returns.

impl<T, U, P> PushBack_<FieldPath<P>> for FieldPathSet<T, U> where
    T: PushBack_<FieldPath<P>>, 
[src]

impl<T, U, P, U2> PushBack_<FieldPathSet<(P,), U2>> for FieldPathSet<T, U> where
    T: PushBack_<P>, 
[src]

impl<T, T2, U, U2> Append_<FieldPathSet<T2, U2>> for FieldPathSet<T, U> where
    T: Append_<T2>, 
[src]

impl<T, U> IsFieldPathSet for FieldPathSet<T, U>[src]

type PathUniqueness = U

Whether the pats in the set can contain duplicate paths.

impl<T, U> From<FieldPathSet<(FieldPath<T>,), U>> for FieldPath<T>[src]

impl<P> From<FieldPath<P>> for FieldPathSet<(FieldPath<P>,), UniquePaths>[src]

impl<T, U> Copy for FieldPathSet<T, U>[src]

impl<T, U> Clone for FieldPathSet<T, U>[src]

impl<T> MarkerType for FieldPathSet<T, AliasedPaths>[src]

Auto Trait Implementations

impl<T, U> Unpin for FieldPathSet<T, U> where
    T: Unpin,
    U: Unpin

impl<T, U> Send for FieldPathSet<T, U> where
    T: Send,
    U: Send

impl<T, U> Sync for FieldPathSet<T, U> where
    T: Sync,
    U: Sync

impl<T, U> UnwindSafe for FieldPathSet<T, U> where
    T: UnwindSafe,
    U: UnwindSafe

impl<T, U> RefUnwindSafe for FieldPathSet<T, U> where
    T: RefUnwindSafe,
    U: RefUnwindSafe

Blanket Implementations

impl<T> GetFieldExt for T where
    T: ?Sized
[src]

impl<This, T> Array0<T> for This[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TypeIdentity for T where
    T: ?Sized
[src]

type Type = T

The same type as Self. Read more

impl<T> SelfOps for T where
    T: ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The error type returned when the conversion fails.