pub struct GeneratorIdentity { /* private fields */ }Expand description
Which generator produced an identity, and under which rendered shape.
The name and the shape version are the two load-bearing facts a staleness comparison reads. The package version is recorded and read back but compared by nothing, because a report of “a different generator” on a version bump nobody’s output noticed is noise dressed as provenance.
Implementations§
Source§impl GeneratorIdentity
impl GeneratorIdentity
Sourcepub const fn declared(
name: &'static str,
shape: ShapeVersion,
package: &'static str,
) -> Self
pub const fn declared( name: &'static str, shape: ShapeVersion, package: &'static str, ) -> Self
The generator under its declared name, rendered shape, and recorded package version.
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
The generator’s stable name. One of the two facts a staleness comparison reads.
Sourcepub const fn shape(self) -> ShapeVersion
pub const fn shape(self) -> ShapeVersion
The rendered shape’s version. The other fact a staleness comparison reads.
Sourcepub const fn package_version(self) -> &'static str
pub const fn package_version(self) -> &'static str
The package version, recorded for a reader and compared by nothing.
Sourcepub fn same_shape(self, other: Self) -> bool
pub fn same_shape(self, other: Self) -> bool
Whether two generator identities name the same generator rendering the same shape.
The comparison a staleness reading wants, and the reason it is a named road rather than ==: equality compares the package version too, and the package version moves for reasons no output noticed.
Trait Implementations§
Source§impl Clone for GeneratorIdentity
impl Clone for GeneratorIdentity
Source§fn clone(&self) -> GeneratorIdentity
fn clone(&self) -> GeneratorIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more