Trait HasSubset

Source
pub unsafe trait HasSubset<'a, Reference, SubsetIndex>: PartialRef<'a> {
    type Remainder: PartialRef<'a, Target = Self::Target>;
}
Expand description

(internal) Asserts that the parts of the partial reference Reference are a subset of the parts of the partial reference having this trait.

A list of parts is considered a subset if they can be plucked in sequence.

Required Associated Types§

Source

type Remainder: PartialRef<'a, Target = Self::Target>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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.

Source§

type Remainder = Reference

Source§

impl<'a, SubsetPart, Reference, PluckedRef, PartIndex, TailIndex> HasSubset<'a, Const<SubsetPart, Reference>, SubsetIndexCons<PartIndex, TailIndex>> for PluckedRef
where PluckedRef: PluckConst<'a, SubsetPart, PartIndex>, <PluckedRef as PluckConst<'a, SubsetPart, PartIndex>>::Remainder: HasSubset<'a, Reference, TailIndex>, Reference: HasTarget,

(internal) To have a reference with a constant first part as subset, pluck that part and make sure the remaining references are in a subset relation.

Source§

type Remainder = <<PluckedRef as PluckConst<'a, SubsetPart, PartIndex>>::Remainder as HasSubset<'a, Reference, TailIndex>>::Remainder

Source§

impl<'a, SubsetPart, Reference, PluckedRef, PartIndex, TailIndex> HasSubset<'a, Mut<SubsetPart, Reference>, SubsetIndexCons<PartIndex, TailIndex>> for PluckedRef
where PluckedRef: PluckMut<'a, SubsetPart, PartIndex>, <PluckedRef as PluckMut<'a, SubsetPart, PartIndex>>::Remainder: HasSubset<'a, Reference, TailIndex>, Reference: HasTarget,

(internal) To have a reference with a mutable first part as subset, pluck that part and make sure the remaining references are in a subset relation.

Source§

type Remainder = <<PluckedRef as PluckMut<'a, SubsetPart, PartIndex>>::Remainder as HasSubset<'a, Reference, TailIndex>>::Remainder