Struct couchdb::path::DocumentId [] [src]

pub struct DocumentId(_);

DocumentId comprises one or more URL path segments that, together, identify a document.

For example, given the document path /db/_design/doc, the document id is _design/doc.

For more information about path-related types, see the module-level documentation.

Methods

impl DocumentId
[src]

Constructs a new document id.

Converts the document id into a string.

Returns whether the document id specifies a normal document—i.e., neither a design document nor a local document.

Tries to convert the document id into a normal document name.

The conversion fails if and only if the document id does not specify a normal document. In other words, the conversion succeeds if and only if the document id begins with neither the _design/ prefix nor the _local prefix.

Returns whether the document id specifies a design document—i.e., the document begins with the _design/ prefix.

Tries to convert the document id into a design document name.

Tries to converts the document id into a design document id.

The conversion fails if and only if the document id does not specify a design document. In other words, the conversion succeeds if and only if the document id begins with the _design/ prefix.

Returns whether the document id specifies a local document—i.e., the document begins with the _local/ prefix.

Tries to convert the document id into a local document name.

The conversion fails if and only if the document id does not specify a local document. In other words, the conversion succeeds if and only if the document id begins with the _local/ prefix.

Trait Implementations

impl Clone for DocumentId
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for DocumentId
[src]

Formats the value using the given formatter.

impl Default for DocumentId
[src]

Returns the "default value" for a type. Read more

impl Eq for DocumentId
[src]

impl Hash for DocumentId
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Ord for DocumentId
[src]

This method returns an Ordering between self and other. Read more

impl PartialEq for DocumentId
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd for DocumentId
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl AsRef<str> for DocumentId
[src]

Performs the conversion.

impl Display for DocumentId
[src]

Formats the value using the given formatter. Read more

impl<'a> From<&'a str> for DocumentId
[src]

Performs the conversion.

impl From<String> for DocumentId
[src]

Performs the conversion.

impl From<DesignDocumentId> for DocumentId
[src]

Performs the conversion.

impl From<NormalDocumentName> for DocumentId
[src]

Performs the conversion.

impl From<DesignDocumentName> for DocumentId
[src]

Performs the conversion.

impl From<LocalDocumentName> for DocumentId
[src]

Performs the conversion.