pub struct CanisterMetadataSection {
pub name: String,
pub visibility: MetadataVisibility,
pub networks: Option<BTreeSet<String>>,
pub path: Option<PathBuf>,
pub content: Option<String>,
}Expand description
§Canister Metadata Configuration
Configures a custom metadata section for the canister wasm. dfx uses the first definition of a given name matching the current network, ignoring any of the same name that follow.
Fields§
§name: String§Name
The name of the wasm section
visibility: MetadataVisibility§Visibility
networks: Option<BTreeSet<String>>§Networks
Networks this section applies to. If this field is absent, then it applies to all networks. An empty array means this element will not apply to any network.
path: Option<PathBuf>§Path
Path to file containing section contents.
Conflicts with content.
For sections with name=candid:service, this field is optional, and if not specified, dfx will use
the canister’s candid definition.
If specified for a Motoko canister, the service defined in the specified path must be a valid subtype of the canister’s
actual candid service definition.
content: Option<String>§Content
Content of this metadata section.
Conflicts with path.
Implementations§
Source§impl CanisterMetadataSection
impl CanisterMetadataSection
pub fn applies_to_network(&self, network: &str) -> bool
Trait Implementations§
Source§impl Clone for CanisterMetadataSection
impl Clone for CanisterMetadataSection
Source§fn clone(&self) -> CanisterMetadataSection
fn clone(&self) -> CanisterMetadataSection
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 CanisterMetadataSection
impl Debug for CanisterMetadataSection
Source§impl Default for CanisterMetadataSection
impl Default for CanisterMetadataSection
Source§fn default() -> CanisterMetadataSection
fn default() -> CanisterMetadataSection
Source§impl<'de> Deserialize<'de> for CanisterMetadataSection
impl<'de> Deserialize<'de> for CanisterMetadataSection
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>,
Source§impl JsonSchema for CanisterMetadataSection
impl JsonSchema for CanisterMetadataSection
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for CanisterMetadataSection
impl RefUnwindSafe for CanisterMetadataSection
impl Send for CanisterMetadataSection
impl Sync for CanisterMetadataSection
impl Unpin for CanisterMetadataSection
impl UnsafeUnpin for CanisterMetadataSection
impl UnwindSafe for CanisterMetadataSection
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more