Struct couchdb::DatabaseName [] [src]

pub struct DatabaseName(_);

Name of a database.

A database name wraps a string specifying a database—e.g., the db part of the HTTP request to GET http://example.com:5984/db.

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

Although the DatabaseName 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 DatabaseName 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 DatabaseName

fn new() -> Self

Constructs an empty database name.

Trait Implementations

impl Display for DatabaseName

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

impl AsRef<str> for DatabaseName

fn as_ref(&self) -> &str

impl AsRef<String> for DatabaseName

fn as_ref(&self) -> &String

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

fn from(name: &str) -> Self

impl From<String> for DatabaseName

fn from(name: String) -> Self

impl Serialize for DatabaseName

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

impl Deserialize for DatabaseName

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

impl From<DatabasePath> for DatabaseName

fn from(db_path: DatabasePath) -> Self

Derived Implementations

impl PartialOrd for DatabaseName

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

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

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

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

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

impl PartialEq for DatabaseName

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

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

impl Ord for DatabaseName

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

impl Hash for DatabaseName

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

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

impl Eq for DatabaseName

impl Debug for DatabaseName

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

impl Clone for DatabaseName

fn clone(&self) -> DatabaseName

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