Struct crev_data::proof::trust::Trust

source ·
pub struct Trust {
    pub common: Common,
    pub ids: Vec<PublicId>,
    pub trust: TrustLevel,
    pub comment: String,
    pub override_: Vec<OverrideItem>,
}
Expand description

Body of a Trust Proof

Fields§

§common: Common§ids: Vec<PublicId>§trust: TrustLevel§comment: String§override_: Vec<OverrideItem>

Implementations§

source§

impl Trust

source

pub const KIND: &'static str = "trust"

source

pub fn touch_date(&mut self)

Trait Implementations§

source§

impl Clone for Trust

source§

fn clone(&self) -> Trust

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 Trust

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 Content for Trust

source§

impl ContentWithDraft for Trust

source§

fn to_draft(&self) -> Draft

source§

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

source§

impl Debug for Trust

source§

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

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

impl<'de> Deserialize<'de> for Trust

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 Display for Trust

source§

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

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

impl From<Trust> for Draft

source§

fn from(trust: Trust) -> Self

Converts to this type from the input type.
source§

impl Serialize for Trust

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 Trust

§

impl RefUnwindSafe for Trust

§

impl Send for Trust

§

impl Sync for Trust

§

impl Unpin for Trust

§

impl UnwindSafe for Trust

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> ContentDeserialize for T

source§

fn deserialize_from<IO>(io: IO) -> Result<T, Error>
where IO: Read,

source§

impl<T> ContentExt for T
where T: Content,

source§

fn serialize(&self) -> Result<String, Error>

source§

fn sign_by(&self, id: &UnlockedId) -> Result<Proof, Error>

source§

fn ensure_serializes_to_valid_proof(&self) -> Result<(), Error>

Ensure the proof generated from this Content is going to deserialize
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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. 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>,