pub struct BundleArchive { /* private fields */ }Expand description
An in-memory gzip-compressed Treetop bundle archive.
Implementations§
Source§impl BundleArchive
impl BundleArchive
pub fn from_bytes(bytes: Vec<u8>) -> Self
pub fn read(path: impl AsRef<Path>, max_compressed_bytes: usize) -> Result<Self>
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn sha256(&self) -> String
pub fn validate( &self, signature_policy: SignaturePolicy, trust_store: &TrustStore, limits: ArchiveLimits, ) -> Result<ValidatedBundle>
Sourcepub fn resign(&self, key: &SigningKey, limits: ArchiveLimits) -> Result<Self>
pub fn resign(&self, key: &SigningKey, limits: ArchiveLimits) -> Result<Self>
Validate and re-sign an archive, replacing its existing signature.
Trait Implementations§
Source§impl Clone for BundleArchive
impl Clone for BundleArchive
Source§fn clone(&self) -> BundleArchive
fn clone(&self) -> BundleArchive
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 moreAuto Trait Implementations§
impl Freeze for BundleArchive
impl RefUnwindSafe for BundleArchive
impl Send for BundleArchive
impl Sync for BundleArchive
impl Unpin for BundleArchive
impl UnsafeUnpin for BundleArchive
impl UnwindSafe for BundleArchive
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more