pub struct WriterLog;Expand description
Stateless operations over the chained log table.
Implementations§
Source§impl WriterLog
impl WriterLog
Sourcepub fn ensure_schema(db: &dyn Backend) -> Result<()>
pub fn ensure_schema(db: &dyn Backend) -> Result<()>
Create the backing table if it does not exist. Idempotent.
Sourcepub fn head(
db: &dyn Backend,
stream: &str,
writer: &str,
) -> Result<Option<Entry>>
pub fn head( db: &dyn Backend, stream: &str, writer: &str, ) -> Result<Option<Entry>>
The highest-seq entry for (stream, writer), or None if empty.
Sourcepub fn append(
db: &dyn Backend,
stream: &str,
writer: &str,
payload: &[u8],
) -> Result<Entry>
pub fn append( db: &dyn Backend, stream: &str, writer: &str, payload: &[u8], ) -> Result<Entry>
Append payload, computing the next seq and chained content_hash.
Auto Trait Implementations§
impl Freeze for WriterLog
impl RefUnwindSafe for WriterLog
impl Send for WriterLog
impl Sync for WriterLog
impl Unpin for WriterLog
impl UnsafeUnpin for WriterLog
impl UnwindSafe for WriterLog
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