pub struct FolderManager { /* private fields */ }Implementations§
Source§impl FolderManager
impl FolderManager
pub fn new(node: &IrohNode) -> Self
Sourcepub async fn create(&self, mode: SyncMode) -> Result<SyncwebFolder>
pub async fn create(&self, mode: SyncMode) -> Result<SyncwebFolder>
§Errors
Returns an error if the folder namespace cannot be created or initialized.
Sourcepub async fn join(
&self,
ticket_str: impl AsRef<str>,
mode: SyncMode,
) -> Result<SyncwebFolder>
pub async fn join( &self, ticket_str: impl AsRef<str>, mode: SyncMode, ) -> Result<SyncwebFolder>
§Errors
Returns an error if the folder ticket cannot be joined or parsed.
Sourcepub async fn subscribe_public(
&self,
ticket: &BlobTicket,
) -> Result<SyncwebFolder>
pub async fn subscribe_public( &self, ticket: &BlobTicket, ) -> Result<SyncwebFolder>
Subscribe to a public blob ticket by creating a local read-only namespace containing the fetched content.
§Errors
Returns an error if the blob cannot be fetched or the local namespace cannot be created.
Sourcepub async fn accept(&self, namespace_id: NamespaceId) -> Result<SyncwebFolder>
pub async fn accept(&self, namespace_id: NamespaceId) -> Result<SyncwebFolder>
§Errors
Returns an error if the folder namespace cannot be accepted.
Sourcepub async fn drop(&self, namespace_id: NamespaceId) -> Result<()>
pub async fn drop(&self, namespace_id: NamespaceId) -> Result<()>
§Errors
Returns an error if the folder namespace cannot be dropped.
Sourcepub async fn list(&self) -> Result<Vec<SyncwebFolder>>
pub async fn list(&self) -> Result<Vec<SyncwebFolder>>
§Errors
Returns an error if the folders cannot be listed.
Sourcepub async fn get(&self, namespace_id: NamespaceId) -> Result<SyncwebFolder>
pub async fn get(&self, namespace_id: NamespaceId) -> Result<SyncwebFolder>
Return a managed folder, loading locally available namespaces first.
§Errors
Returns an error if the local namespace list cannot be read.
Trait Implementations§
Source§impl Clone for FolderManager
impl Clone for FolderManager
Source§fn clone(&self) -> FolderManager
fn clone(&self) -> FolderManager
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for FolderManager
impl !UnwindSafe for FolderManager
impl Freeze for FolderManager
impl Send for FolderManager
impl Sync for FolderManager
impl Unpin for FolderManager
impl UnsafeUnpin for FolderManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more