Struct couchdb::DocumentName [] [src]

pub struct DocumentName(_);

Name of a document.

A document name wraps a string specifying a document—e.g., the doc part of the HTTP request to GET http://example.com:5984/db/doc or the design-doc part of the HTTP request to GET http://example.com:5984/db/_design/design-doc.

Document names may be converted to and from strings. They are never percent-encoded.

Although the DocumentName 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 DocumentName 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.

Methods

impl DocumentName

fn new() -> Self

Constructs an empty document name.

Trait Implementations

impl Display for DocumentName

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

impl AsRef<str> for DocumentName

fn as_ref(&self) -> &str

impl AsRef<String> for DocumentName

fn as_ref(&self) -> &String

impl<'a> From<&'a str> for DocumentName

fn from(name: &str) -> Self

impl From<String> for DocumentName

fn from(name: String) -> Self

impl Serialize for DocumentName

fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer

impl Deserialize for DocumentName

fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error> where D: Deserializer

impl From<DesignDocumentName> for DocumentName

fn from(ddoc_name: DesignDocumentName) -> Self

Derived Implementations

impl PartialOrd for DocumentName

fn partial_cmp(&self, __arg_0: &DocumentName) -> Option<Ordering>

fn lt(&self, __arg_0: &DocumentName) -> bool

fn le(&self, __arg_0: &DocumentName) -> bool

fn gt(&self, __arg_0: &DocumentName) -> bool

fn ge(&self, __arg_0: &DocumentName) -> bool

impl PartialEq for DocumentName

fn eq(&self, __arg_0: &DocumentName) -> bool

fn ne(&self, __arg_0: &DocumentName) -> bool

impl Ord for DocumentName

fn cmp(&self, __arg_0: &DocumentName) -> Ordering

impl Hash for DocumentName

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Eq for DocumentName

impl Debug for DocumentName

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for DocumentName

fn clone(&self) -> DocumentName

fn clone_from(&mut self, source: &Self)