pub struct RuntimeSchema {
pub namespace: String,
pub version: u32,
pub aliases: BTreeMap<String, String>,
pub predicates: BTreeMap<String, SchemaOp>,
pub actions: BTreeMap<String, SchemaOp>,
pub deprecated: BTreeMap<String, String>,
}Fields§
§namespace: String§version: u32§aliases: BTreeMap<String, String>alias -> primitive (resolved at compile time)
predicates: BTreeMap<String, SchemaOp>local name -> op (full name = namespace.local)
actions: BTreeMap<String, SchemaOp>§deprecated: BTreeMap<String, String>§31: deprecated terms (full name -> reason)
Implementations§
Source§impl RuntimeSchema
impl RuntimeSchema
pub fn from_json(bytes: &[u8]) -> Result<Self, String>
Sourcepub fn validate(&self, e: &ClExpr) -> Result<(), String>
pub fn validate(&self, e: &ClExpr) -> Result<(), String>
Validate a CL expression (recursively, §6.3) against the schema.
RefExpr is skipped (it binds to another message’s validation).
Trait Implementations§
Source§impl Clone for RuntimeSchema
impl Clone for RuntimeSchema
Source§fn clone(&self) -> RuntimeSchema
fn clone(&self) -> RuntimeSchema
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 RuntimeSchema
impl Debug for RuntimeSchema
Source§impl<'de> Deserialize<'de> for RuntimeSchema
impl<'de> Deserialize<'de> for RuntimeSchema
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
Auto Trait Implementations§
impl Freeze for RuntimeSchema
impl RefUnwindSafe for RuntimeSchema
impl Send for RuntimeSchema
impl Sync for RuntimeSchema
impl Unpin for RuntimeSchema
impl UnsafeUnpin for RuntimeSchema
impl UnwindSafe for RuntimeSchema
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