Struct wick_interface_types::ComponentSignature
source · pub struct ComponentSignature {
pub name: Option<String>,
pub format: ComponentVersion,
pub metadata: ComponentMetadata,
pub wellknown: Vec<WellKnownSchema>,
pub types: Vec<TypeDefinition>,
pub operations: Vec<OperationSignature>,
pub config: Vec<TypeDefinition>,
}
Expand description
Signature for Collections.
Fields§
§name: Option<String>
Name of the collection.
format: ComponentVersion
The format of the component signature.
metadata: ComponentMetadata
Component implementation version.
wellknown: Vec<WellKnownSchema>
A map of type signatures referenced elsewhere.
types: Vec<TypeDefinition>
A map of type signatures referenced elsewhere.
operations: Vec<OperationSignature>
A list of OperationSignatures in this component.
config: Vec<TypeDefinition>
The component’s configuration for this implementation.
Implementations§
source§impl ComponentSignature
impl ComponentSignature
sourcepub fn new<T: AsRef<str>>(name: T) -> Self
pub fn new<T: AsRef<str>>(name: T) -> Self
Create a new ComponentSignature with the passed name.
sourcepub fn get_component(&self, field: &str) -> Option<&OperationSignature>
pub fn get_component(&self, field: &str) -> Option<&OperationSignature>
Get the ComponentSignature for the requested component.
sourcepub fn add_component(self, signature: OperationSignature) -> Self
pub fn add_component(self, signature: OperationSignature) -> Self
Add a ComponentSignature to the collection.
sourcepub fn version(self, version: impl AsRef<str>) -> Self
pub fn version(self, version: impl AsRef<str>) -> Self
Set the version of the ComponentSignature.
sourcepub fn format(self, format: ComponentVersion) -> Self
pub fn format(self, format: ComponentVersion) -> Self
Set the format of the ComponentSignature.
sourcepub fn metadata(self, features: ComponentMetadata) -> Self
pub fn metadata(self, features: ComponentMetadata) -> Self
Set the features of the ComponentSignature.
Trait Implementations§
source§impl Clone for ComponentSignature
impl Clone for ComponentSignature
source§fn clone(&self) -> ComponentSignature
fn clone(&self) -> ComponentSignature
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 ComponentSignature
impl Debug for ComponentSignature
source§impl Default for ComponentSignature
impl Default for ComponentSignature
source§fn default() -> ComponentSignature
fn default() -> ComponentSignature
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ComponentSignature
impl<'de> Deserialize<'de> for ComponentSignature
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 PartialEq<ComponentSignature> for ComponentSignature
impl PartialEq<ComponentSignature> for ComponentSignature
source§fn eq(&self, other: &ComponentSignature) -> bool
fn eq(&self, other: &ComponentSignature) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.