pub struct CardDavStorage<C: HttpClient> { /* private fields */ }Expand description
A storage backed by a carddav server.
A single storage represents a single server with a specific set of credentials.
Implementations§
Source§impl<C: HttpClient> CardDavStorage<C>
impl<C: HttpClient> CardDavStorage<C>
Sourcepub fn builder(webdav: WebDavClient<C>) -> CardDavStorageBuilder<C>
pub fn builder(webdav: WebDavClient<C>) -> CardDavStorageBuilder<C>
Create a new builder for this storage type.
Trait Implementations§
Source§impl<C: HttpClient> Storage for CardDavStorage<C>
impl<C: HttpClient> Storage for CardDavStorage<C>
Source§fn discover_collections<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Discovery>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn discover_collections<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Discovery>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Finds existing collections for this storage.
Will only return collections stored under the principal’s home set. In most common scenarios, this implies that only collections owned by the current user are found and not other collections.
Collections outside the principal’s home set can be referenced by using an absolute path.
Source§fn delete_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes a carddav collection.
Performs multiple network calls to ensure that the collection is empty. If the
server supports Etag (it MUST as per the spec), this method guarantees that the
collection is empty when deleting it.
If the server does not support Etags on collections, possible race conditions could occur and if address book components are added to the collection at the same time, they may be deleted.
Source§fn get_property<'life0, 'life1, 'async_trait>(
&'life0 self,
href: &'life1 str,
prop: Property,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_property<'life0, 'life1, 'async_trait>(
&'life0 self,
href: &'life1 str,
prop: Property,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read metadata from a collection.
Metadata is fetched using the PROPFIND method under the hood. Some servers may not
support some properties.
§Errors
If the underlying HTTP connection fails or if the server returns invalid data.
Source§fn href_for_collection_id(&self, id: &CollectionId) -> Result<Href>
fn href_for_collection_id(&self, id: &CollectionId) -> Result<Href>
§Errors
Returns ErrorKind::PreconditionFailed if a home set was not found in the carddav
server.
Source§fn check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn create_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
href.