pub struct FsSpineStore { /* private fields */ }Expand description
Filesystem-backed spine store rooted at the plugin dir. Index files
live at <root>/<kind>/<owner>/<repo>.json.
Implementations§
Source§impl FsSpineStore
impl FsSpineStore
Sourcepub fn new(root: impl Into<PathBuf>) -> Self
pub fn new(root: impl Into<PathBuf>) -> Self
Create a store rooted at plugin_dir (the same dir passed to
crate::ForgeService::new).
Trait Implementations§
Source§impl Clone for FsSpineStore
impl Clone for FsSpineStore
Source§fn clone(&self) -> FsSpineStore
fn clone(&self) -> FsSpineStore
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 FsSpineStore
impl Debug for FsSpineStore
Source§impl SpineStore for FsSpineStore
impl SpineStore for FsSpineStore
Source§fn load<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
kind: &'life1 str,
owner: &'life2 str,
repo: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, ForgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn load<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
kind: &'life1 str,
owner: &'life2 str,
repo: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, ForgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Load the raw JSON bytes for
(kind, owner, repo), or None when
no index has been written yet.Source§fn store<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
kind: &'life1 str,
owner: &'life2 str,
repo: &'life3 str,
bytes: &'life4 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), ForgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn store<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
kind: &'life1 str,
owner: &'life2 str,
repo: &'life3 str,
bytes: &'life4 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), ForgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Atomically persist
bytes for (kind, owner, repo).Auto Trait Implementations§
impl Freeze for FsSpineStore
impl RefUnwindSafe for FsSpineStore
impl Send for FsSpineStore
impl Sync for FsSpineStore
impl Unpin for FsSpineStore
impl UnsafeUnpin for FsSpineStore
impl UnwindSafe for FsSpineStore
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