pub struct RuntimePluginTrustStore { /* private fields */ }Implementations§
Source§impl RuntimePluginTrustStore
impl RuntimePluginTrustStore
pub fn new() -> Self
pub fn from_json(bytes: &[u8]) -> PluginRuntimeResult<Self>
pub fn to_json_pretty(&self) -> PluginRuntimeResult<Vec<u8>>
Sourcepub fn enroll(
&mut self,
runtime_id: impl Into<String>,
library_path: impl AsRef<Path>,
expected_sha256: impl Into<String>,
) -> PluginRuntimeResult<&TrustedRuntimePlugin>
pub fn enroll( &mut self, runtime_id: impl Into<String>, library_path: impl AsRef<Path>, expected_sha256: impl Into<String>, ) -> PluginRuntimeResult<&TrustedRuntimePlugin>
Enroll an already installed library. Enrollment verifies the exact
bytes but leaves execution disabled until set_enabled(id, true).
pub fn set_enabled( &mut self, runtime_id: &str, enabled: bool, ) -> PluginRuntimeResult<()>
pub fn get(&self, runtime_id: &str) -> Option<&TrustedRuntimePlugin>
pub fn entries(&self) -> impl Iterator<Item = &TrustedRuntimePlugin>
Trait Implementations§
Source§impl Clone for RuntimePluginTrustStore
impl Clone for RuntimePluginTrustStore
Source§fn clone(&self) -> RuntimePluginTrustStore
fn clone(&self) -> RuntimePluginTrustStore
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 moreSource§impl Debug for RuntimePluginTrustStore
impl Debug for RuntimePluginTrustStore
Source§impl Default for RuntimePluginTrustStore
impl Default for RuntimePluginTrustStore
Source§impl<'de> Deserialize<'de> for RuntimePluginTrustStore
impl<'de> Deserialize<'de> for RuntimePluginTrustStore
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RuntimePluginTrustStore
impl RefUnwindSafe for RuntimePluginTrustStore
impl Send for RuntimePluginTrustStore
impl Sync for RuntimePluginTrustStore
impl Unpin for RuntimePluginTrustStore
impl UnsafeUnpin for RuntimePluginTrustStore
impl UnwindSafe for RuntimePluginTrustStore
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