pub struct ComponentMetadata {
pub scheme: String,
pub schema_version: String,
pub version: String,
pub description: String,
pub uri_syntax: String,
pub capabilities: ComponentCapabilities,
pub uri_options: Vec<UriOption>,
}Fields§
§scheme: String§schema_version: String§version: String§description: String§uri_syntax: String§capabilities: ComponentCapabilities§uri_options: Vec<UriOption>Implementations§
Source§impl ComponentMetadata
impl ComponentMetadata
Sourcepub const SCHEMA_VERSION: &'static str = "1"
pub const SCHEMA_VERSION: &'static str = "1"
Current schema version string.
Sourcepub fn minimal(scheme: &str) -> Self
pub fn minimal(scheme: &str) -> Self
Build a minimal metadata entry for scheme.
Sets schema_version to Self::SCHEMA_VERSION. The version field is
left empty — components that override Component::metadata should
supply their own env!("CARGO_PKG_VERSION").
Sourcepub fn with_description(self, description: &str) -> Self
pub fn with_description(self, description: &str) -> Self
Set the human-readable description field.
Sourcepub fn with_capabilities(self, caps: ComponentCapabilities) -> Self
pub fn with_capabilities(self, caps: ComponentCapabilities) -> Self
Replace the capabilities block.
Sourcepub fn with_uri_options(self, opts: Vec<UriOption>) -> Self
pub fn with_uri_options(self, opts: Vec<UriOption>) -> Self
Append to the uri_options list.
Trait Implementations§
Source§impl Clone for ComponentMetadata
impl Clone for ComponentMetadata
Source§fn clone(&self) -> ComponentMetadata
fn clone(&self) -> ComponentMetadata
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 ComponentMetadata
impl Debug for ComponentMetadata
Source§impl<'de> Deserialize<'de> for ComponentMetadata
impl<'de> Deserialize<'de> for ComponentMetadata
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
impl Eq for ComponentMetadata
Source§impl PartialEq for ComponentMetadata
impl PartialEq for ComponentMetadata
Source§impl Serialize for ComponentMetadata
impl Serialize for ComponentMetadata
impl StructuralPartialEq for ComponentMetadata
Auto Trait Implementations§
impl Freeze for ComponentMetadata
impl RefUnwindSafe for ComponentMetadata
impl Send for ComponentMetadata
impl Sync for ComponentMetadata
impl Unpin for ComponentMetadata
impl UnsafeUnpin for ComponentMetadata
impl UnwindSafe for ComponentMetadata
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