pub struct PicPcaPayload {
pub profile: String,
pub position: u64,
pub context_of_authority: IndexedAuthorityMap,
pub challenge: PcaChallenge,
}Expand description
PIC PCA COSE payload: the signed trusted authority checkpoint.
Fields§
§profile: StringPIC profile identifier; must equal crate::PROFILE_0_2.
position: u64Position of this checkpoint in its lineage, starting at 0.
The canonical Indexed Authority Map in force at this checkpoint.
challenge: PcaChallengeChallenge state binding the next transition to this checkpoint.
Implementations§
Source§impl PicPcaPayload
impl PicPcaPayload
Sourcepub fn new(
position: u64,
context: IndexedAuthorityMap,
next_challenge: Vec<u8>,
) -> Self
pub fn new( position: u64, context: IndexedAuthorityMap, next_challenge: Vec<u8>, ) -> Self
A Profile 0.2 checkpoint payload at position carrying context
and the verifier-issued next_challenge.
Sourcepub fn check_profile(&self) -> Result<(), RejectReason>
pub fn check_profile(&self) -> Result<(), RejectReason>
Rejects the payload unless profile is crate::PROFILE_0_2.
Sourcepub fn validate(&self) -> Result<(), RejectReason>
pub fn validate(&self) -> Result<(), RejectReason>
Validates the checkpoint payload before it is signed or accepted.
Trait Implementations§
Source§impl Clone for PicPcaPayload
impl Clone for PicPcaPayload
Source§fn clone(&self) -> PicPcaPayload
fn clone(&self) -> PicPcaPayload
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PicPcaPayload
impl Debug for PicPcaPayload
Source§impl<'de> Deserialize<'de> for PicPcaPayload
impl<'de> Deserialize<'de> for PicPcaPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PicPcaPayload
Source§impl PartialEq for PicPcaPayload
impl PartialEq for PicPcaPayload
Source§impl Serialize for PicPcaPayload
impl Serialize for PicPcaPayload
impl StructuralPartialEq for PicPcaPayload
Auto Trait Implementations§
impl Freeze for PicPcaPayload
impl RefUnwindSafe for PicPcaPayload
impl Send for PicPcaPayload
impl Sync for PicPcaPayload
impl Unpin for PicPcaPayload
impl UnsafeUnpin for PicPcaPayload
impl UnwindSafe for PicPcaPayload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more