pub struct Journal<'a> { /* private fields */ }Expand description
The sayings of one investigation, kept in a store.
tree is what lets several investigations share one store without seeing
each other, and it is in the name for the same reason a study’s is: a name
is the one part of this that cannot be refactored later.
Implementations§
Source§impl<'a> Journal<'a>
impl<'a> Journal<'a>
pub fn of(tree: impl Into<String>, kept: &'a dyn Store) -> Self
Sourcepub fn say(
&self,
commit: &str,
verdict: Option<Verdict>,
who: &str,
prose: &str,
) -> Result<u32, Trouble>
pub fn say( &self, commit: &str, verdict: Option<Verdict>, who: &str, prose: &str, ) -> Result<u32, Trouble>
Says something about a commit, and returns which slot it landed in.
Claims rather than binds, so two people saying something at the same moment both get heard: whoever is told the slot is taken asks for the next one, exactly as a worker does with a trial.
Sourcepub fn all(&self) -> Result<Vec<Saying>, Trouble>
pub fn all(&self) -> Result<Vec<Saying>, Trouble>
Everything anybody said in this investigation, oldest first.
A scan and no fetches: the prose stays a digest until somebody asks to read it.
Auto Trait Implementations§
impl<'a> Freeze for Journal<'a>
impl<'a> !RefUnwindSafe for Journal<'a>
impl<'a> Send for Journal<'a>
impl<'a> Sync for Journal<'a>
impl<'a> Unpin for Journal<'a>
impl<'a> UnsafeUnpin for Journal<'a>
impl<'a> !UnwindSafe for Journal<'a>
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