Struct wasm_metadata::RegistryMetadata
source · 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§fn eq(&self, other: &RegistryMetadata) -> bool
fn eq(&self, other: &RegistryMetadata) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for RegistryMetadata
impl Serialize for RegistryMetadata
impl StructuralPartialEq for RegistryMetadata
Auto Trait Implementations§
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