pub struct SignedReceipt {
pub receipt: Receipt,
pub signature: Vec<u8>,
}Expand description
A receipt paired with its detached witness signature.
Per the spec, signatures are not part of the receipt body.
Fields§
§receipt: ReceiptThe receipt body
signature: Vec<u8>Witness signature (externalized, not in body), hex-encoded for JSON
Implementations§
Source§impl SignedReceipt
impl SignedReceipt
Sourcepub fn to_trailer_value(&self) -> Result<String, Error>
pub fn to_trailer_value(&self) -> Result<String, Error>
Formats this signed receipt as a Git trailer value (base64url-encoded JSON).
Encodes both the receipt body and the hex-encoded signature.
Sourcepub fn from_trailer_value(value: &str) -> Result<SignedReceipt, String>
pub fn from_trailer_value(value: &str) -> Result<SignedReceipt, String>
Parses a signed receipt from a Git trailer value (base64url-encoded JSON).
Trait Implementations§
Source§impl Clone for SignedReceipt
impl Clone for SignedReceipt
Source§fn clone(&self) -> SignedReceipt
fn clone(&self) -> SignedReceipt
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 SignedReceipt
impl Debug for SignedReceipt
Source§impl<'de> Deserialize<'de> for SignedReceipt
impl<'de> Deserialize<'de> for SignedReceipt
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SignedReceipt, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SignedReceipt, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SignedReceipt
Source§impl PartialEq for SignedReceipt
impl PartialEq for SignedReceipt
Source§fn eq(&self, other: &SignedReceipt) -> bool
fn eq(&self, other: &SignedReceipt) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SignedReceipt
impl Serialize for SignedReceipt
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SignedReceipt
Auto Trait Implementations§
impl Freeze for SignedReceipt
impl RefUnwindSafe for SignedReceipt
impl Send for SignedReceipt
impl Sync for SignedReceipt
impl Unpin for SignedReceipt
impl UnsafeUnpin for SignedReceipt
impl UnwindSafe for SignedReceipt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.