pub struct Layout {
pub iface: IfaceId,
pub fingerprint: Fingerprint,
pub tag: Tag,
pub collections: Vec<Collection>,
/* private fields */
}Expand description
A revision’s collections, its fingerprint and the heartbeat’s tag: what a heartbeat covering it is read and written by.
Fields§
§iface: IfaceId§fingerprint: Fingerprint§tag: TagThe low 4 bits of the fingerprint’s last byte.
collections: Vec<Collection>In map order.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn tag_of(fp: &Fingerprint) -> Tag
pub fn tag_of(fp: &Fingerprint) -> Tag
A heartbeat’s tag for a revision: the low 4 bits of its fingerprint’s last byte, its last hex digit.
Sourcepub fn horizon(&self) -> Option<Duration>
pub fn horizon(&self) -> Option<Duration>
The shortest horizon among the collections, None with none.
Sourcepub fn class_horizon(&self, class: Class) -> Option<Duration>
pub fn class_horizon(&self, class: Class) -> Option<Duration>
The shortest horizon among the collections of class, None with
none: what the revision asks of the period of that class’s owner
heartbeats (freshness.v2 §2.4).
Sourcepub fn classes(&self) -> Vec<Class>
pub fn classes(&self) -> Vec<Class>
The classes the revision’s collections have, link first: the
owner heartbeat keys a group covering it may ride.
Sourcepub fn index_of(&self, resource: &str) -> Option<usize>
pub fn index_of(&self, resource: &str) -> Option<usize>
The collection named <kind token>/<template>.
Sourcepub fn collection_of(&self, key: &str) -> Option<usize>
pub fn collection_of(&self, key: &str) -> Option<usize>
The collection a member key belongs to: a base-relative state key
(or one with a namespace in front) of this interface whose winning
template (§2.2) is a collection’s. None for any other key.
Trait Implementations§
impl Eq for Layout
impl StructuralPartialEq for Layout
Auto Trait Implementations§
impl Forget for Layout
impl Freeze for Layoutwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Collection>: Freeze,
PhantomData<(KindToken, Template, Option<usize>)>: Freeze,
impl Move for Layout
impl RefUnwindSafe for Layout
impl Send for Layoutwhere
RawVecInner: Send,
impl Sync for Layoutwhere
RawVecInner: Sync,
impl Unpin for Layout
impl UnsafeUnpin for Layoutwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Collection>: UnsafeUnpin,
PhantomData<(KindToken, Template, Option<usize>)>: UnsafeUnpin,
impl UnwindSafe for Layoutwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more