Skip to main content

Epoch

Struct Epoch 

Source
pub struct Epoch<V>
where V: Identities,
{ pub lineage: <V as Identities>::Lineage, pub id: <V as Identities>::EpochId, }
Expand description

An epoch: an epoch id within a lineage, by the lineage’s plain name. What the API reports, and what names or asks about an epoch – a gate, a query – takes; what acts on a lineage takes a Tag instead (DI-D-40). Plain data, so a consumer can keep it in its own records.

Only PartialOrd: epochs of different lineages are unrelated, so partial_cmp is None for them, and within one lineage they order by id.

Fields§

§lineage: <V as Identities>::Lineage

The lineage whose epoch space the id belongs to.

§id: <V as Identities>::EpochId

The consumer’s epoch id within that lineage.

Implementations§

Source§

impl<V> Epoch<V>
where V: Identities,

Source

pub fn new( lineage: <V as Identities>::Lineage, id: <V as Identities>::EpochId, ) -> Epoch<V>

The epoch id of lineage.

Trait Implementations§

Source§

impl<V> Clone for Epoch<V>

Source§

fn clone(&self) -> Epoch<V>

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<V> Copy for Epoch<V>
where V: Copy + Identities, <V as Identities>::Lineage: Copy, <V as Identities>::EpochId: Copy,

Source§

impl<V> Debug for Epoch<V>

Source§

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

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

impl<V> Eq for Epoch<V>
where V: Eq + Identities, <V as Identities>::Lineage: Eq, <V as Identities>::EpochId: Eq,

Source§

impl<V> Hash for Epoch<V>
where V: Hash + Identities, <V as Identities>::Lineage: Hash, <V as Identities>::EpochId: Hash,

Source§

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

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<V> PartialEq for Epoch<V>

Source§

fn eq(&self, other: &Epoch<V>) -> bool

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

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

Inequality operator !=. Read more
Source§

impl<V> PartialOrd for Epoch<V>
where V: Identities,

Source§

fn partial_cmp(&self, other: &Epoch<V>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<V> StructuralPartialEq for Epoch<V>

Auto Trait Implementations§

§

impl<V> Freeze for Epoch<V>
where <V as Identities>::Lineage: Freeze, <V as Identities>::EpochId: Freeze,

§

impl<V> RefUnwindSafe for Epoch<V>

§

impl<V> Send for Epoch<V>
where <V as Identities>::Lineage: Send, <V as Identities>::EpochId: Send,

§

impl<V> Sync for Epoch<V>
where <V as Identities>::Lineage: Sync, <V as Identities>::EpochId: Sync,

§

impl<V> Unpin for Epoch<V>
where <V as Identities>::Lineage: Unpin, <V as Identities>::EpochId: Unpin,

§

impl<V> UnsafeUnpin for Epoch<V>

§

impl<V> UnwindSafe for Epoch<V>

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.