Enum iroh_docs::engine::DefaultAuthorStorage
source · pub enum DefaultAuthorStorage {
Mem,
Persistent(PathBuf),
}
Available on crate feature
engine
only.Expand description
Where to persist the default author.
If set to Mem
, a new author will be created in the docs store before spawning the sync
engine. Changing the default author will not be persisted.
If set to Persistent
, the default author will be loaded from and persisted to the specified
path (as base32 encoded string of the author’s public key).
Variants§
Implementations§
source§impl DefaultAuthorStorage
impl DefaultAuthorStorage
sourcepub async fn load(&self, docs_store: &SyncHandle) -> Result<AuthorId>
pub async fn load(&self, docs_store: &SyncHandle) -> Result<AuthorId>
Load the default author from the storage.
Will create and save a new author if the storage is empty.
Returns an error if the author can’t be parsed or if the uathor does not exist in the docs store.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DefaultAuthorStorage
impl RefUnwindSafe for DefaultAuthorStorage
impl Send for DefaultAuthorStorage
impl Sync for DefaultAuthorStorage
impl Unpin for DefaultAuthorStorage
impl UnwindSafe for DefaultAuthorStorage
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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