pub struct RecordingWindow {
pub events: usize,
pub from_at: Option<u64>,
pub to_at: Option<u64>,
pub from_lamport: Option<u64>,
pub to_lamport: Option<u64>,
}Expand description
The events a recording holds, from first to last.
use majordomus_cli::capability::builtin::observatory::RecordingWindow;
let w = RecordingWindow { events: 2, from_at: Some(100), to_at: Some(160), from_lamport: Some(9), to_lamport: Some(10) };
assert_eq!(w.to_at.unwrap() - w.from_at.unwrap(), 60, "a minute of the journal");Fields§
§events: usizeHow many events.
from_at: Option<u64>The earliest event’s time, in seconds since the epoch.
to_at: Option<u64>The latest event’s time, in seconds since the epoch.
from_lamport: Option<u64>The smallest logical clock.
to_lamport: Option<u64>The largest logical clock.
Trait Implementations§
Source§impl Clone for RecordingWindow
impl Clone for RecordingWindow
Source§fn clone(&self) -> RecordingWindow
fn clone(&self) -> RecordingWindow
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 RecordingWindow
impl Debug for RecordingWindow
Source§impl<'de> Deserialize<'de> for RecordingWindow
impl<'de> Deserialize<'de> for RecordingWindow
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 RecordingWindow
impl JsonSchema for RecordingWindow
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 RecordingWindow
impl PartialEq for RecordingWindow
Source§fn eq(&self, other: &RecordingWindow) -> bool
fn eq(&self, other: &RecordingWindow) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RecordingWindow
impl Serialize for RecordingWindow
impl StructuralPartialEq for RecordingWindow
Auto Trait Implementations§
impl Freeze for RecordingWindow
impl RefUnwindSafe for RecordingWindow
impl Send for RecordingWindow
impl Sync for RecordingWindow
impl Unpin for RecordingWindow
impl UnsafeUnpin for RecordingWindow
impl UnwindSafe for RecordingWindow
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