crev_data::proof::content

Trait CommonOps

source
pub trait CommonOps {
    // Required method
    fn common(&self) -> &Common;

    // Provided methods
    fn kind(&self) -> &str { ... }
    fn from(&self) -> &PublicId { ... }
    fn date(&self) -> &DateTime<FixedOffset> { ... }
    fn date_utc(&self) -> DateTime<Utc> { ... }
    fn author_id(&self) -> &Id { ... }
    fn author_public_id(&self) -> &PublicId { ... }
    fn ensure_kind_is(&self, kind: &str) -> ValidationResult<()> { ... }
}
Expand description

Common operations on types containing Common

Required Methods§

source

fn common(&self) -> &Common

Provided Methods§

source

fn kind(&self) -> &str

Is it crate review or something else?

source

fn from(&self) -> &PublicId

Who wrote and signed this review/trust

source

fn date(&self) -> &DateTime<FixedOffset>

When it has been written according to its creator

source

fn date_utc(&self) -> DateTime<Utc>

When it has been written according to its creator

source

fn author_id(&self) -> &Id

ID of the person who signed it

source

fn author_public_id(&self) -> &PublicId

Displayable version of ID of the person who signed it

source

fn ensure_kind_is(&self, kind: &str) -> ValidationResult<()>

Easy check of kind()

Implementors§