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 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 Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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