pub struct RegistryMetadata { /* private fields */ }
Implementations§
Source§impl RegistryMetadata
impl RegistryMetadata
Sourcepub fn add_to_wasm(&self, input: &[u8]) -> Result<Vec<u8>>
pub fn add_to_wasm(&self, input: &[u8]) -> Result<Vec<u8>>
Merge into an existing wasm module. Rewrites the module with this registry-metadata section overwriting its existing one, or adds this registry-metadata section if none is present.
pub fn from_wasm(bytes: &[u8]) -> Result<Option<Self>>
Sourcepub fn from_bytes(bytes: &[u8], offset: usize) -> Result<Self>
pub fn from_bytes(bytes: &[u8], offset: usize) -> Result<Self>
Gets the registry-matadata from a slice of bytes
pub fn validate(&self) -> Result<()>
Get authors
Set authors
Sourcepub fn get_description(&self) -> Option<&String>
pub fn get_description(&self) -> Option<&String>
Get description
Sourcepub fn set_description(&mut self, description: Option<String>)
pub fn set_description(&mut self, description: Option<String>)
Set description
Sourcepub fn get_license(&self) -> Option<&String>
pub fn get_license(&self) -> Option<&String>
Get license
Sourcepub fn set_license(&mut self, license: Option<String>)
pub fn set_license(&mut self, license: Option<String>)
Set license
Sourcepub fn get_custom_licenses(&self) -> Option<&Vec<CustomLicense>>
pub fn get_custom_licenses(&self) -> Option<&Vec<CustomLicense>>
Get custom_licenses
Sourcepub fn set_custom_licenses(
&mut self,
custom_licenses: Option<Vec<CustomLicense>>,
)
pub fn set_custom_licenses( &mut self, custom_licenses: Option<Vec<CustomLicense>>, )
Set custom_licenses
Sourcepub fn get_categories(&self) -> Option<&Vec<String>>
pub fn get_categories(&self) -> Option<&Vec<String>>
Get categories
Sourcepub fn set_categories(&mut self, categories: Option<Vec<String>>)
pub fn set_categories(&mut self, categories: Option<Vec<String>>)
Set categories
Trait Implementations§
Source§impl Clone for RegistryMetadata
impl Clone for RegistryMetadata
Source§fn clone(&self) -> RegistryMetadata
fn clone(&self) -> RegistryMetadata
Returns a copy 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 moreSource§impl Debug for RegistryMetadata
impl Debug for RegistryMetadata
Source§impl Default for RegistryMetadata
impl Default for RegistryMetadata
Source§fn default() -> RegistryMetadata
fn default() -> RegistryMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RegistryMetadata
impl<'de> Deserialize<'de> for RegistryMetadata
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
Source§impl Display for RegistryMetadata
impl Display for RegistryMetadata
Source§impl PartialEq for RegistryMetadata
impl PartialEq for RegistryMetadata
Source§impl Serialize for RegistryMetadata
impl Serialize for RegistryMetadata
impl StructuralPartialEq for RegistryMetadata
Auto Trait Implementations§
impl Freeze for RegistryMetadata
impl RefUnwindSafe for RegistryMetadata
impl Send for RegistryMetadata
impl Sync for RegistryMetadata
impl Unpin for RegistryMetadata
impl UnwindSafe for RegistryMetadata
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