Struct wasmflow_interface::CollectionSignature
source · [−]pub struct CollectionSignature {
pub name: Option<String>,
pub features: CollectionFeatures,
pub format: u32,
pub version: String,
pub wellknown: Vec<WellKnownSchema>,
pub types: TypeMap,
pub components: ComponentMap,
pub config: TypeMap,
}
Expand description
Signature for Collections.
Fields
name: Option<String>
Name of the collection.
features: CollectionFeatures
Component implementation version.
format: u32
Schema format version.
version: String
Version of the schema.
wellknown: Vec<WellKnownSchema>
A map of type signatures referenced elsewhere.
types: TypeMap
A map of type signatures referenced elsewhere.
components: ComponentMap
A list of ComponentSignatures in this collection.
config: TypeMap
The component’s configuration for this implementation.
Implementations
sourceimpl CollectionSignature
impl CollectionSignature
sourcepub fn new<T: AsRef<str>>(name: T) -> Self
pub fn new<T: AsRef<str>>(name: T) -> Self
Create a new CollectionSignature with the passed name.
sourcepub fn get_component(&self, field: &str) -> Option<&ComponentSignature>
pub fn get_component(&self, field: &str) -> Option<&ComponentSignature>
Get the CollectionSignature for the requested component.
sourcepub fn add_component(self, signature: ComponentSignature) -> Self
pub fn add_component(self, signature: ComponentSignature) -> 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 CollectionSignature.
sourcepub fn format(self, format: u32) -> Self
pub fn format(self, format: u32) -> Self
Set the format of the CollectionSignature.
sourcepub fn features(self, features: CollectionFeatures) -> Self
pub fn features(self, features: CollectionFeatures) -> Self
Set the features of the CollectionSignature.
Trait Implementations
sourceimpl Clone for CollectionSignature
impl Clone for CollectionSignature
sourcefn clone(&self) -> CollectionSignature
fn clone(&self) -> CollectionSignature
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CollectionSignature
impl Debug for CollectionSignature
sourceimpl Default for CollectionSignature
impl Default for CollectionSignature
sourcefn default() -> CollectionSignature
fn default() -> CollectionSignature
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for CollectionSignature
impl<'de> Deserialize<'de> for CollectionSignature
sourcefn 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
sourceimpl PartialEq<CollectionSignature> for CollectionSignature
impl PartialEq<CollectionSignature> for CollectionSignature
sourcefn eq(&self, other: &CollectionSignature) -> bool
fn eq(&self, other: &CollectionSignature) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CollectionSignature) -> bool
fn ne(&self, other: &CollectionSignature) -> bool
This method tests for !=
.
sourceimpl Serialize for CollectionSignature
impl Serialize for CollectionSignature
impl StructuralPartialEq for CollectionSignature
Auto Trait Implementations
impl RefUnwindSafe for CollectionSignature
impl Send for CollectionSignature
impl Sync for CollectionSignature
impl Unpin for CollectionSignature
impl UnwindSafe for CollectionSignature
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more