Struct chill::Revision
[−]
[src]
pub struct Revision { // some fields omitted }
A document revision, which uniquely identifies a version of a document.
A document revision comprises a sequence number and an MD5 digest.
The sequence number (usually) starts at 1
when the document is created and
increments by one each time the document is updated. The digest is a hash of
the document content.
In serialized form, a revision looks like
1-9c65296036141e575d32ba9c034dd3ee
.
Methods
impl Revision
[src]
fn parse(s: &str) -> Result<Self, Error>
Constructs a new Revision
from the given string.
The string must be of the form 42-1234567890abcdef1234567890abcdef
.
fn sequence_number(&self) -> u64
Returns the sequence number part of the revision.
The sequence number is the 123
part of the revision
123-00000000000000000000000000000000
.
Trait Implementations
impl PartialEq for Revision
[src]
fn eq(&self, __arg_0: &Revision) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Revision) -> bool
This method tests for !=
.
impl Hash for Revision
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl Eq for Revision
[src]
impl Debug for Revision
[src]
impl Clone for Revision
[src]
fn clone(&self) -> Revision
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Display for Revision
[src]
impl FromStr for Revision
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a string s
to return a value of this type. Read more
impl Serialize for Revision
[src]
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer
Serializes this value into this serializer.
impl Deserialize for Revision
[src]
fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error> where D: Deserializer
Deserialize this value given this Deserializer
.