pub struct Store { /* private fields */ }Expand description
Content-addressed trace store.
root should be an existing directory (typically .shadow/traces/).
This struct does NOT create the root on construction — callers can
choose whether to pre-create it.
Implementations§
Source§impl Store
impl Store
Sourcepub fn new(root: impl Into<PathBuf>) -> Self
pub fn new(root: impl Into<PathBuf>) -> Self
Wrap an existing root directory. See SPEC §8 for the layout.
Sourcepub fn put(&self, trace: &[Record]) -> Result<String>
pub fn put(&self, trace: &[Record]) -> Result<String>
Put a trace. Returns the trace’s root id (the first record’s id).
Writes atomically: the final path does not appear until the write has fully completed and flushed to disk.
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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