pub struct ObservatoryEvents {
pub active: bool,
pub after: Option<u64>,
pub cursor: u64,
pub expired: bool,
pub events: Vec<Value>,
}Expand description
The Observatory’s events above a cursor, as the activity scene draws them.
use majordomus_cli::capability::builtin::observatory::ObservatoryEvents;
let e: ObservatoryEvents = serde_json::from_value(serde_json::json!({
"active": true, "after": 9, "cursor": 12, "expired": false, "events": [{ "id": "s:3" }],
})).unwrap();
assert!(e.cursor > e.after.unwrap(), "the next request resumes past what was read");Fields§
§active: boolWhether a mesh runs in this process; without one there is no journal to follow.
after: Option<u64>The cursor that was asked, when one was.
cursor: u64The cursor to ask next: the logical clock of the newest event read, or the journal’s newest clock when the cursor had expired.
expired: boolThe cursor names a clock this journal never reached (another runtime’s journal, or one that restarted): nothing above it can be read, and the reader takes a fresh projection.
events: Vec<Value>The events above the cursor, newest first, as marks: identity, kind, node, logical clock and time, never a body.
Trait Implementations§
Source§impl Clone for ObservatoryEvents
impl Clone for ObservatoryEvents
Source§fn clone(&self) -> ObservatoryEvents
fn clone(&self) -> ObservatoryEvents
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObservatoryEvents
impl Debug for ObservatoryEvents
Source§impl<'de> Deserialize<'de> for ObservatoryEvents
impl<'de> Deserialize<'de> for ObservatoryEvents
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ObservatoryEvents
impl JsonSchema for ObservatoryEvents
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ObservatoryEvents
impl PartialEq for ObservatoryEvents
Source§fn eq(&self, other: &ObservatoryEvents) -> bool
fn eq(&self, other: &ObservatoryEvents) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ObservatoryEvents
impl Serialize for ObservatoryEvents
impl StructuralPartialEq for ObservatoryEvents
Auto Trait Implementations§
impl Freeze for ObservatoryEvents
impl RefUnwindSafe for ObservatoryEvents
impl Send for ObservatoryEvents
impl Sync for ObservatoryEvents
impl Unpin for ObservatoryEvents
impl UnsafeUnpin for ObservatoryEvents
impl UnwindSafe for ObservatoryEvents
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