[−][src]Struct provider_archive::ProviderArchive
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]
capid: &str,
name: &str,
vendor: &str,
rev: Option<i32>,
ver: Option<String>
) -> ProviderArchive
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]
&mut self,
destination: &str,
issuer: &KeyPair,
subject: &KeyPair,
compress_par: bool
) -> Result<()>
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
impl RefUnwindSafe for ProviderArchive
impl Send for ProviderArchive
impl Sync for ProviderArchive
impl Unpin for ProviderArchive
impl UnwindSafe for ProviderArchive
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,