Enum couchdb::DocumentId
[−]
[src]
pub enum DocumentId { Normal(DocumentName), Design(DesignDocumentName), Local(DocumentName), }
Document identifier.
A document id specifies a document's type and name. For example, given the
HTTP request to GET http://example.com:5984/db/_design/design-doc
, the
document id comprises _design/design-doc
and specifies a design document
with the name design-doc
.
There are three types of documents: normal, design (i.e., _design
),
and local (i.e., _local
). Each type is expressed as an enum variant that
owns the underlying document name.
Although the DocumentId
type implements the Ord
and PartialOrd
traits,
it provides no guarantees how that ordering is defined and may change the
definition between any two releases of the couchdb crate. That is, for two
DocumentId
values a
and b
, the expression a < b
may hold true now
but not in a subsequent release. Consequently, applications must not rely
upon any particular ordering definition.
Variants
Normal | Normal document—i.e., neither a design document nor a local document. |
Design | Design document (i.e., |
Local | Local document (i.e., |