[][src]Struct provider_archive::ProviderArchive

pub struct ProviderArchive { /* fields omitted */ }

A provider archive is a specialized ZIP file that contains a set of embedded and signed claims (a .JWT file) as well as a list of binary files, one plugin library for each supported target architecture and OS combination

Implementations

impl ProviderArchive[src]

pub fn new(
    capid: &str,
    name: &str,
    vendor: &str,
    rev: Option<i32>,
    ver: Option<String>
) -> ProviderArchive
[src]

Creates a new provider archive in memory, to which native library files can be added.

pub fn add_library(&mut self, target: &str, input: &[u8]) -> Result<()>[src]

Adds a native library file (.so, .dylib, .dll) to the archive for a given target string

pub fn targets(&self) -> Vec<String>[src]

Gets the list of architecture/OS targets within the archive

pub fn target_bytes(&self, target: &str) -> Option<Vec<u8>>[src]

Retrieves the raw bytes for a given target

pub fn claims(&self) -> Option<Claims<CapabilityProvider>>[src]

Returns the embedded claims associated with this archive. Note that claims are not available while building a new archive. They are only available after the archive has been written or if the archive was loaded from an existing file

pub fn try_load(input: &[u8]) -> Result<ProviderArchive>[src]

Attempts to read a Provider Archive (PAR) file's bytes to analyze and verify its contents. The embedded claims in this archive will be validated, and the file hashes contained in those claims will be compared and verified against hashes computed at load time. This prevents the contents of the archive from being modified without the embedded claims being re-signed

pub fn write(
    &mut self,
    destination: &str,
    issuer: &KeyPair,
    subject: &KeyPair,
    compress_par: bool
) -> Result<()>
[src]

Generates a Provider Archive (PAR) file with all of the library files and a signed set of claims in an embedded JWT

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,