Struct crev_data::proof::content::Common

source ·
pub struct Common {
    pub kind: Option<String>,
    pub version: i64,
    pub date: DateTime<FixedOffset>,
    pub from: PublicId,
    pub original: Option<OriginalReference>,
}
Expand description

A Common part of every Content format

Fields§

§kind: Option<String>

Type of this review/trust/whatever file

§version: i64

A version, to allow future backward-incompatible extensions and changes.

§date: DateTime<FixedOffset>

Timestamp of proof creation

§from: PublicId

Author of the proof

§original: Option<OriginalReference>

Reference to original proof when reissuing

Trait Implementations§

source§

impl Clone for Common

source§

fn clone(&self) -> Common

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl CommonOps for Common

source§

fn common(&self) -> &Common

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()
source§

impl Debug for Common

source§

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

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Common

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Common

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Common

§

impl RefUnwindSafe for Common

§

impl Send for Common

§

impl Sync for Common

§

impl Unpin for Common

§

impl UnwindSafe for Common

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,