pub struct Attention {
pub instance: String,
pub revision: u64,
pub items: Vec<AttentionItem>,
pub omitted: u64,
}Expand description
GET /v1/attention: what needs attention now, most urgent first.
Fields§
§instance: StringThe daemon process that keeps the snapshot: new at each start, never the same as an earlier one’s. Revisions count within one instance; a client compares them only when the instances are the same.
revision: u64From 1 at the daemon’s start, one up whenever the content changes, also when one item replaces another.
attention.changed on /v1/events carries the new one. Two snapshots of one instance and revision say the
same.
items: Vec<AttentionItem>By tone, then known evidence times before unknown, newest first, then key; at most ATTENTION_MAX.
omitted: u64Items beyond ATTENTION_MAX, left out.
Implementations§
Source§impl Attention
impl Attention
Sourcepub fn new(
instance: String,
revision: u64,
items: Vec<AttentionItem>,
) -> Attention
pub fn new( instance: String, revision: u64, items: Vec<AttentionItem>, ) -> Attention
The snapshot of items, as attention_items orders them, at revision of instance: the first
ATTENTION_MAX, and how many more.
Sourcepub fn same_content(&self, other: &Attention) -> bool
pub fn same_content(&self, other: &Attention) -> bool
Whether other says the same, whatever its instance and revision.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Attention
impl<'de> Deserialize<'de> for Attention
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Attention
impl StructuralPartialEq for Attention
Auto Trait Implementations§
impl Forget for Attention
impl Freeze for Attention
impl Move for Attention
impl RefUnwindSafe for Attention
impl Send for Attention
impl Sync for Attention
impl Unpin for Attention
impl UnsafeUnpin for Attention
impl UnwindSafe for Attention
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.