pub struct NamespaceSchema {
pub namespace: String,
pub options: HashMap<String, OptionMetadata>,
/* private fields */
}Expand description
Schema for a namespace, containing validator and option metadata
Fields§
§namespace: String§options: HashMap<String, OptionMetadata>Implementations§
Source§impl NamespaceSchema
impl NamespaceSchema
Sourcepub fn validate_values(&self, values: &Value) -> ValidationResult<()>
pub fn validate_values(&self, values: &Value) -> ValidationResult<()>
Sourcepub fn get_default(&self, key: &str) -> Option<&Value>
pub fn get_default(&self, key: &str) -> Option<&Value>
Get the default value for an option key. Returns None if the key doesn’t exist in the schema.
Auto Trait Implementations§
impl Freeze for NamespaceSchema
impl !RefUnwindSafe for NamespaceSchema
impl Send for NamespaceSchema
impl Sync for NamespaceSchema
impl Unpin for NamespaceSchema
impl !UnwindSafe for NamespaceSchema
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