pub struct CollectionId(/* private fields */);
Expand description
An identifier for a collection.
Collection identifiers are a short string that uniquely identify a collection inside a storage.
They are based on the href
of a collection, which never changes. A CollectionId
is
intended as a more human-friendly substitute for collection href
s, and an attribute which is
more storage-agnostic.
The following limitations exist, given that such values would produce ambiguous results with
the implementation of VdirStorage
, CalDavStorage
, and CardDavStorage
:
- A
CollectionId
cannot contain a/
(slash) - A
CollectionId
cannot be exactly..
(double period). - A
CollectionId
cannot be exactly.
(a single period).
Instances of CollectionId
always contain previously validated data. Instances are internally
reference counted and cheap to clone
.
§Example
let collection_id: CollectionId = "personal".parse().unwrap();
Trait Implementations§
source§impl AsRef<str> for CollectionId
impl AsRef<str> for CollectionId
source§impl Clone for CollectionId
impl Clone for CollectionId
source§fn clone(&self) -> CollectionId
fn clone(&self) -> CollectionId
Returns a copy of the value. Read more
1.0.0 · 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 CollectionId
impl Debug for CollectionId
source§impl Display for CollectionId
impl Display for CollectionId
source§impl FromStr for CollectionId
impl FromStr for CollectionId
source§impl Hash for CollectionId
impl Hash for CollectionId
source§impl PartialEq for CollectionId
impl PartialEq for CollectionId
impl Eq for CollectionId
impl StructuralPartialEq for CollectionId
Auto Trait Implementations§
impl Freeze for CollectionId
impl RefUnwindSafe for CollectionId
impl Send for CollectionId
impl Sync for CollectionId
impl Unpin for CollectionId
impl UnwindSafe for CollectionId
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.