Skip to main content

RelatedSet

Struct RelatedSet 

Source
pub struct RelatedSet { /* private fields */ }
Expand description

One diagnostic’s related set: the identities it carries, married to how it was capped.

A capping that can be carried away from its set is a claim that can be told about a different one, so the set-building road is the only road in and the seats are private.

§Ordering

The body rides first, and a reader does not depend on that: an identity states its own level.

Implementations§

Source§

impl RelatedSet

Source

pub fn derived_over(family: Family, issues: &[Vec<u8>]) -> Self

The related set one refusal body amounts to, derived over that body’s own issue material.

A road taking a body identity and a set of per-issue identities as two arguments takes two halves that do not check each other: each is honestly derived on its own, so the pair can name one refusal’s body over another refusal’s issues and still read exactly like a set that belongs together. Deriving here removes the pairing instead of policing it.

§Construction

This is a mint site, so its grammar is stated in full. Both levels derive at Role::DiagnosticRelation, rooted, at position zero, over

content = u64be(len(family)) || family || u64be(material.len()) || material

where the family is its declared name’s UTF-8 bytes, the material of an issue is that issue’s own canonical bytes, and the material of the body is u64be(issue.len()) || issue for every issue in order, concatenated. The per-issue identities are derived first and the body’s identity over exactly that material in exactly that order, so two different issue sets cannot reach one body identity and one issue set cannot reach two. The two subjects are related-issue and related-body; everything else an independent reader needs is on Transcript.

§Bounds

The set overruns RELATED_ISSUE_LIMIT at the boundary by exactly one, because the body’s own identity sits ahead of the per-issue ones. Where that happens the body’s identity is carried alone — a coarser commitment to the same refusal, never a shorter commitment to a different one — and the capping states how many per-issue identities are not there.

Handed no issues, this road answers with RelatedSet::nothing_enumerated rather than deriving a body identity over empty material, so “nothing was enumerated” has one representation and two diagnostics that enumerated nothing compare equal.

Source

pub const fn nothing_enumerated() -> Self

The canonical empty relation: what a road that enumerated nothing amounts to.

A single-cause refusal establishes one cause and enumerates nothing, so there is no per-issue set to fall short of: zero identities are carried and zero were dropped.

§Nonclaims

Emptiness here is a stated posture about an act that ran — the road looked, and there was nothing to enumerate. It is not an absent set, not a set that failed to build, and not a capping that dropped everything.

Source

pub fn carried(&self) -> &[RelatedIdentity]

The identities the set carries, body first.

Source

pub const fn capping(&self) -> Capping

Whether that set names every established issue.

Trait Implementations§

Source§

impl Clone for RelatedSet

Source§

fn clone(&self) -> RelatedSet

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RelatedSet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RelatedSet

Source§

impl Hash for RelatedSet

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for RelatedSet

Source§

fn eq(&self, other: &RelatedSet) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RelatedSet

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.