pub struct EmbeddedPluginRegistry { /* private fields */ }Implementations§
Source§impl EmbeddedPluginRegistry
impl EmbeddedPluginRegistry
pub fn parse( json: &[u8], expected_target: &str, expected_architecture: &str, ) -> Result<Self, EmbeddedPluginRegistryError>
Sourcepub fn parse_fragments<'a>(
fragments: impl IntoIterator<Item = &'a [u8]>,
expected_target: &str,
expected_architecture: &str,
) -> Result<Self, EmbeddedPluginRegistryError>
pub fn parse_fragments<'a>( fragments: impl IntoIterator<Item = &'a [u8]>, expected_target: &str, expected_architecture: &str, ) -> Result<Self, EmbeddedPluginRegistryError>
Parses and combines independently packaged registry fragments.
Mobile package managers merge plugin artifacts from multiple dependencies. Each dependency owns one fragment; this method applies the same limits and duplicate checks to the combined registry before any dynamic library is loaded.
pub fn target(&self) -> &str
pub fn architecture(&self) -> &str
pub fn minimum_os(&self) -> Option<&str>
pub fn artifacts(&self) -> &[EmbeddedPluginArtifact]
pub fn load_native( &self, resolve: impl FnMut(&EmbeddedPluginLocator) -> Result<PathBuf, String>, ) -> Result<PluginRegistry, EmbeddedPluginRegistryError>
Sourcepub fn load_native_with_platform_integrity(
&self,
resolve: impl FnMut(&EmbeddedPluginLocator) -> Result<PathBuf, String>,
verify_platform_integrity: impl FnMut(&Path, &EmbeddedPluginArtifact) -> Result<(), String>,
) -> Result<PluginRegistry, EmbeddedPluginRegistryError>
pub fn load_native_with_platform_integrity( &self, resolve: impl FnMut(&EmbeddedPluginLocator) -> Result<PathBuf, String>, verify_platform_integrity: impl FnMut(&Path, &EmbeddedPluginArtifact) -> Result<(), String>, ) -> Result<PluginRegistry, EmbeddedPluginRegistryError>
Loads every artifact after the host verifies platform-owned integrity.
Sourcepub fn load_native_selected<'a>(
&self,
references: impl IntoIterator<Item = &'a PluginReference>,
resolve: impl FnMut(&EmbeddedPluginLocator) -> Result<PathBuf, String>,
) -> Result<PluginRegistry, EmbeddedPluginRegistryError>
pub fn load_native_selected<'a>( &self, references: impl IntoIterator<Item = &'a PluginReference>, resolve: impl FnMut(&EmbeddedPluginLocator) -> Result<PathBuf, String>, ) -> Result<PluginRegistry, EmbeddedPluginRegistryError>
Loads only artifacts named by explicit runtime references.
Merely packaging a native plugin must not execute its entry point or affect the no-plugin mobile baseline. Multiple capability references to the same plugin load that artifact exactly once.
Sourcepub fn load_native_selected_with_platform_integrity<'a>(
&self,
references: impl IntoIterator<Item = &'a PluginReference>,
resolve: impl FnMut(&EmbeddedPluginLocator) -> Result<PathBuf, String>,
verify_platform_integrity: impl FnMut(&Path, &EmbeddedPluginArtifact) -> Result<(), String>,
) -> Result<PluginRegistry, EmbeddedPluginRegistryError>
pub fn load_native_selected_with_platform_integrity<'a>( &self, references: impl IntoIterator<Item = &'a PluginReference>, resolve: impl FnMut(&EmbeddedPluginLocator) -> Result<PathBuf, String>, verify_platform_integrity: impl FnMut(&Path, &EmbeddedPluginArtifact) -> Result<(), String>, ) -> Result<PluginRegistry, EmbeddedPluginRegistryError>
Loads explicitly selected artifacts after the host verifies platform-owned integrity such as an Apple code signature.
Sourcepub fn select_native_artifacts<'a, 'reference>(
&'a self,
references: impl IntoIterator<Item = &'reference PluginReference>,
) -> Result<Vec<&'a EmbeddedPluginArtifact>, EmbeddedPluginRegistryError>
pub fn select_native_artifacts<'a, 'reference>( &'a self, references: impl IntoIterator<Item = &'reference PluginReference>, ) -> Result<Vec<&'a EmbeddedPluginArtifact>, EmbeddedPluginRegistryError>
Resolves explicit Native references to packaged artifact metadata without loading executable code.
Multiple capability references to one plugin produce one artifact in registry order. Unknown plugin identities and non-Native transports fail before a host inspects any artifact path.
Trait Implementations§
Source§impl Clone for EmbeddedPluginRegistry
impl Clone for EmbeddedPluginRegistry
Source§fn clone(&self) -> EmbeddedPluginRegistry
fn clone(&self) -> EmbeddedPluginRegistry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EmbeddedPluginRegistry
impl Debug for EmbeddedPluginRegistry
Source§impl<'de> Deserialize<'de> for EmbeddedPluginRegistry
impl<'de> Deserialize<'de> for EmbeddedPluginRegistry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for EmbeddedPluginRegistry
Source§impl PartialEq for EmbeddedPluginRegistry
impl PartialEq for EmbeddedPluginRegistry
impl StructuralPartialEq for EmbeddedPluginRegistry
Auto Trait Implementations§
impl Freeze for EmbeddedPluginRegistry
impl RefUnwindSafe for EmbeddedPluginRegistry
impl Send for EmbeddedPluginRegistry
impl Sync for EmbeddedPluginRegistry
impl Unpin for EmbeddedPluginRegistry
impl UnsafeUnpin for EmbeddedPluginRegistry
impl UnwindSafe for EmbeddedPluginRegistry
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
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
key and return true if they are equal.