pub struct ModuleMetadata {
pub name: String,
pub module_type: String,
pub instantiate_fn_name: String,
pub module_path: String,
pub struct_name: String,
pub signature: Option<ModuleSignature>,
pub permissions: ModulePermissions,
pub review_status: CodeReviewStatus,
pub supply_chain: Option<SupplyChainInfo>,
pub sandbox_config: SandboxConfig,
}Expand description
Module metadata for registration with security features
Fields§
§name: String§module_type: String§instantiate_fn_name: String§module_path: String§struct_name: String§signature: Option<ModuleSignature>Cryptographic signature
permissions: ModulePermissionsModule permissions
review_status: CodeReviewStatusCode review status
supply_chain: Option<SupplyChainInfo>Supply chain information
sandbox_config: SandboxConfigSecurity sandbox configuration
Implementations§
Source§impl ModuleMetadata
impl ModuleMetadata
Sourcepub fn new(
name: String,
module_type: String,
instantiate_fn_name: String,
module_path: String,
struct_name: String,
) -> Self
pub fn new( name: String, module_type: String, instantiate_fn_name: String, module_path: String, struct_name: String, ) -> Self
Create a new module metadata
Sourcepub fn secure(
name: String,
module_type: String,
instantiate_fn_name: String,
module_path: String,
struct_name: String,
signature: Option<ModuleSignature>,
permissions: ModulePermissions,
supply_chain: Option<SupplyChainInfo>,
) -> Self
pub fn secure( name: String, module_type: String, instantiate_fn_name: String, module_path: String, struct_name: String, signature: Option<ModuleSignature>, permissions: ModulePermissions, supply_chain: Option<SupplyChainInfo>, ) -> Self
Create a secure module metadata
Sourcepub fn has_valid_signature(&self) -> bool
pub fn has_valid_signature(&self) -> bool
Check if the module has valid signature
Sourcepub fn is_approved(&self) -> bool
pub fn is_approved(&self) -> bool
Check if the module is approved
Sourcepub fn has_supply_chain(&self) -> bool
pub fn has_supply_chain(&self) -> bool
Check if the module has supply chain info
Trait Implementations§
Source§impl Clone for ModuleMetadata
impl Clone for ModuleMetadata
Source§fn clone(&self) -> ModuleMetadata
fn clone(&self) -> ModuleMetadata
Returns a duplicate of the value. Read more
1.0.0 · 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 ModuleMetadata
impl RefUnwindSafe for ModuleMetadata
impl Send for ModuleMetadata
impl Sync for ModuleMetadata
impl Unpin for ModuleMetadata
impl UnwindSafe for ModuleMetadata
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