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§
Source§impl 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§
Source§impl Clone for CollectionSignature
impl Clone for CollectionSignature
Source§fn clone(&self) -> CollectionSignature
fn clone(&self) -> CollectionSignature
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 CollectionSignature
impl Debug for CollectionSignature
Source§impl Default for CollectionSignature
impl Default for CollectionSignature
Source§fn default() -> CollectionSignature
fn default() -> CollectionSignature
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CollectionSignature
impl<'de> Deserialize<'de> for CollectionSignature
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 for CollectionSignature
impl PartialEq for CollectionSignature
Source§impl Serialize for CollectionSignature
impl Serialize for CollectionSignature
impl StructuralPartialEq for CollectionSignature
Auto Trait Implementations§
impl Freeze for CollectionSignature
impl RefUnwindSafe for CollectionSignature
impl Send for CollectionSignature
impl Sync for CollectionSignature
impl Unpin for CollectionSignature
impl UnwindSafe for CollectionSignature
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