pub struct Appended {
pub event: MeshEvent,
pub durability: Durability,
}Expand description
An event this runtime wrote, with what its append acknowledges about the disk.
use std::sync::Arc;
use majordomus_cli::mesh::identity::NodeIdentity;
use majordomus_cli::mesh::journal::{Appended, Durability, EventBody, Journal};
let j = Journal::open(Arc::new(NodeIdentity::ephemeral().unwrap()), "0000000000000001",
"repo".into(), None).unwrap();
let appended: Appended =
j.append_acknowledged(EventBody::SessionClosed { session: "s1".into() }).unwrap();
assert_eq!(appended.event.seq, 1);
assert_eq!(appended.durability, Durability::Memory);Fields§
§event: MeshEventThe event, signed and stamped, held and offered to peers.
durability: DurabilityWhether it reached this machine’s disk.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Appended
impl RefUnwindSafe for Appended
impl Send for Appended
impl Sync for Appended
impl Unpin for Appended
impl UnsafeUnpin for Appended
impl UnwindSafe for Appended
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