pub struct UnsignedManifestRef<'a> { /* private fields */ }Available on crate feature
manifest only.Expand description
An unsigned Image4 manifest that doesn’t own its contents.
§Validation
The manifest’s body IS NOT required to be valid.
Currently the only way to check that an UnsignedManifestRef contains valid data is to decode
its body using the UnsignedManifestRef::decode_body method.
Implementations§
Source§impl<'a> UnsignedManifestRef<'a>
impl<'a> UnsignedManifestRef<'a>
Sourcepub fn decode_after_magic<R: Reader<'a>>(decoder: &mut R) -> Result<Self>
pub fn decode_after_magic<R: Reader<'a>>(decoder: &mut R) -> Result<Self>
Decodes the part of an unsigned manifest after the magic string.
May be used when it is required to first identify what kind of buffer you’re looking at by checking the magic string.
Sourcepub fn decode_body(&self) -> Result<BTreeMap<Tag, Value>>
Available on crate feature alloc only.
pub fn decode_body(&self) -> Result<BTreeMap<Tag, Value>>
alloc only.Decodes the manifest’s body into a BTreeMap describing its properties.
Sourcepub fn sign<K: Signer<S>, S: SignatureEncoding>(
&self,
key: &K,
cert_chain: impl Into<CertChain>,
) -> Result<Manifest, SigningError>
Available on crate feature signature only.
pub fn sign<K: Signer<S>, S: SignatureEncoding>( &self, key: &K, cert_chain: impl Into<CertChain>, ) -> Result<Manifest, SigningError>
signature only.Signs an unsigned manifest with the specified key and certificate chain.
Trait Implementations§
Source§impl<'a> AsRef<UnsignedManifestRef<'a>> for AnyManifestRef<'a>
impl<'a> AsRef<UnsignedManifestRef<'a>> for AnyManifestRef<'a>
Source§fn as_ref(&self) -> &UnsignedManifestRef<'a>
fn as_ref(&self) -> &UnsignedManifestRef<'a>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<'a> AsRef<UnsignedManifestRef<'a>> for ManifestRef<'a>
impl<'a> AsRef<UnsignedManifestRef<'a>> for ManifestRef<'a>
Source§fn as_ref(&self) -> &UnsignedManifestRef<'a>
fn as_ref(&self) -> &UnsignedManifestRef<'a>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<'a> Clone for UnsignedManifestRef<'a>
impl<'a> Clone for UnsignedManifestRef<'a>
Source§fn clone(&self) -> UnsignedManifestRef<'a>
fn clone(&self) -> UnsignedManifestRef<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for UnsignedManifestRef<'a>
impl<'a> Debug for UnsignedManifestRef<'a>
Source§impl<'a> DecodeValue<'a> for UnsignedManifestRef<'a>
impl<'a> DecodeValue<'a> for UnsignedManifestRef<'a>
Source§impl EncodeValue for UnsignedManifestRef<'_>
impl EncodeValue for UnsignedManifestRef<'_>
Source§impl<'a> From<&'a Manifest> for UnsignedManifestRef<'a>
Available on crate feature alloc only.
impl<'a> From<&'a Manifest> for UnsignedManifestRef<'a>
Available on crate feature
alloc only.Source§impl<'a> From<&'a UnsignedManifest> for UnsignedManifestRef<'a>
Available on crate feature alloc only.
impl<'a> From<&'a UnsignedManifest> for UnsignedManifestRef<'a>
Available on crate feature
alloc only.Source§fn from(value: &'a UnsignedManifest) -> Self
fn from(value: &'a UnsignedManifest) -> Self
Converts to this type from the input type.
Source§impl From<&UnsignedManifestRef<'_>> for AnyManifest
Available on crate feature alloc only.
impl From<&UnsignedManifestRef<'_>> for AnyManifest
Available on crate feature
alloc only.Source§fn from(value: &UnsignedManifestRef<'_>) -> Self
fn from(value: &UnsignedManifestRef<'_>) -> Self
Converts to this type from the input type.
Source§impl From<&UnsignedManifestRef<'_>> for UnsignedManifest
Available on crate feature alloc only.
impl From<&UnsignedManifestRef<'_>> for UnsignedManifest
Available on crate feature
alloc only.Source§fn from(value: &UnsignedManifestRef<'_>) -> Self
fn from(value: &UnsignedManifestRef<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<ManifestRef<'a>> for UnsignedManifestRef<'a>
impl<'a> From<ManifestRef<'a>> for UnsignedManifestRef<'a>
Source§fn from(value: ManifestRef<'a>) -> Self
fn from(value: ManifestRef<'a>) -> Self
Converts to this type from the input type.
Source§impl From<UnsignedManifestRef<'_>> for AnyManifest
Available on crate feature alloc only.
impl From<UnsignedManifestRef<'_>> for AnyManifest
Available on crate feature
alloc only.Source§fn from(value: UnsignedManifestRef<'_>) -> Self
fn from(value: UnsignedManifestRef<'_>) -> Self
Converts to this type from the input type.
Source§impl From<UnsignedManifestRef<'_>> for UnsignedManifest
Available on crate feature alloc only.
impl From<UnsignedManifestRef<'_>> for UnsignedManifest
Available on crate feature
alloc only.Source§fn from(value: UnsignedManifestRef<'_>) -> Self
fn from(value: UnsignedManifestRef<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<UnsignedManifestRef<'a>> for AnyManifestRef<'a>
impl<'a> From<UnsignedManifestRef<'a>> for AnyManifestRef<'a>
Source§fn from(value: UnsignedManifestRef<'a>) -> Self
fn from(value: UnsignedManifestRef<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> RefToOwned<'a> for UnsignedManifestRef<'a>
Available on crate feature alloc only.
impl<'a> RefToOwned<'a> for UnsignedManifestRef<'a>
Available on crate feature
alloc only.Source§type Owned = UnsignedManifest
type Owned = UnsignedManifest
The resulting type after obtaining ownership.
Source§fn ref_to_owned(&self) -> Self::Owned
fn ref_to_owned(&self) -> Self::Owned
Creates a new object taking ownership of the data
Auto Trait Implementations§
impl<'a> Freeze for UnsignedManifestRef<'a>
impl<'a> RefUnwindSafe for UnsignedManifestRef<'a>
impl<'a> Send for UnsignedManifestRef<'a>
impl<'a> Sync for UnsignedManifestRef<'a>
impl<'a> Unpin for UnsignedManifestRef<'a>
impl<'a> UnwindSafe for UnsignedManifestRef<'a>
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,
Source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
Source§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
Source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
Source§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer.
Source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.