Skip to main content

Identities

Trait Identities 

Source
pub trait Identities:
    Copy
    + Debug
    + Eq
    + Hash
    + 'static {
    type EpochId: EpochId;
    type Lineage: Copy + Debug + Eq + Hash;
    type OpId: Copy + Debug + Eq + Hash + PartialOrd;
    type FailureId: Copy + Debug + Eq + Hash;
    type FailureToken: Debug;
    type LineageHandle: Clone + Debug;
    type Instant: Instant;

    // Required methods
    fn token_id(token: &Self::FailureToken) -> Self::FailureId;
    fn handle_lineage(handle: &Self::LineageHandle) -> Self::Lineage;
}
Expand description

The identity types an implementation mints, and the consumer’s epoch-id type (DI-D-24). Each identity carries its implementation’s private provenance, so only that implementation can make one, and another instance’s is refused. A zero-sized marker implements this; the shared types are generic over it, so a consumer names one parameter, D::Ids, not five.

Required Associated Types§

Source

type EpochId: EpochId

The consumer’s epoch-id type.

Source

type Lineage: Copy + Debug + Eq + Hash

A durability lineage (DI-D-19).

Source

type OpId: Copy + Debug + Eq + Hash + PartialOrd

One pushed operation. Ordered by push order within an instance; None across instances.

Source

type FailureId: Copy + Debug + Eq + Hash

A durability failure’s Copy identity, used in events and queries.

Source

type FailureToken: Debug

The only thing that can resolve a failure: affine, move-only, and dropping it is closing it (DI-D-12).

Source

type LineageHandle: Clone + Debug

A live lineage’s handle (DI-D-40): what acts on the lineage. Clone; releasing the last copy ends the lineage.

Source

type Instant: Instant

When a failure or a marking was observed: a reading of the implementation’s clock, which never decreases (DI-D-37, DI-D-38, DI-D-50).

Required Methods§

Source

fn token_id(token: &Self::FailureToken) -> Self::FailureId

The failure a token resolves.

Source

fn handle_lineage(handle: &Self::LineageHandle) -> Self::Lineage

The lineage a handle names.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§