Struct couchdb::Revision [] [src]

pub struct Revision {
    // some fields omitted
}

Revision of a document.

A document revision comprises a number and an MD5 hash sum. In serialized form, a revision looks something like 42-1234567890abcdef1234567890abcdef.

Methods

impl Revision

fn parse(s: &str) -> Result<Self, Error>

Constructs a new Revision from the given string.

The string must be of a form like 42-1234567890abcdef1234567890abcdef.

fn update_number(&self) -> u64

Returns the update number part of the revision.

The update number is the 999 part of the revision 999-1234567890abcdef1234567890abcdef.

Trait Implementations

impl Display for Revision

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

impl FromStr for Revision

type Err = Error

fn from_str(s: &str) -> Result<Self, Self::Err>

impl Serialize for Revision

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

impl Deserialize for Revision

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

Derived Implementations

impl PartialOrd for Revision

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

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

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

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

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

impl PartialEq for Revision

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

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

impl Ord for Revision

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

impl Hash for Revision

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

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

impl Eq for Revision

impl Debug for Revision

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

impl Clone for Revision

fn clone(&self) -> Revision

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