pub struct OpMetadata {
pub name: String,
pub input_schema: Option<Value>,
pub reference_schema: Option<Value>,
pub output_schema: Option<Value>,
pub description: Option<String>,
}Expand description
Metadata describing an op’s requirements and schemas
Fields§
§name: String§input_schema: Option<Value>§reference_schema: Option<Value>§output_schema: Option<Value>§description: Option<String>Implementations§
Source§impl OpMetadata
impl OpMetadata
pub fn builder(name: impl Into<String>) -> OpMetadataBuilder
Sourcepub fn validate_dry_context(
&self,
ctx: &DryContext,
) -> Result<ValidationReport, OpError>
pub fn validate_dry_context( &self, ctx: &DryContext, ) -> Result<ValidationReport, OpError>
Validate a dry context against the input schema
Sourcepub fn validate_wet_context(
&self,
ctx: &WetContext,
) -> Result<ValidationReport, OpError>
pub fn validate_wet_context( &self, ctx: &WetContext, ) -> Result<ValidationReport, OpError>
Validate a wet context against the reference schema
Sourcepub fn validate_contexts(
&self,
dry: &DryContext,
wet: &WetContext,
) -> Result<ValidationReport, OpError>
pub fn validate_contexts( &self, dry: &DryContext, wet: &WetContext, ) -> Result<ValidationReport, OpError>
Validate contexts together
Sourcepub fn validate_output<T: Serialize>(
&self,
output: &T,
) -> Result<ValidationReport, OpError>
pub fn validate_output<T: Serialize>( &self, output: &T, ) -> Result<ValidationReport, OpError>
Validate output against the output schema
Trait Implementations§
Source§impl Clone for OpMetadata
impl Clone for OpMetadata
Source§fn clone(&self) -> OpMetadata
fn clone(&self) -> OpMetadata
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 OpMetadata
impl Debug for OpMetadata
Source§impl<'de> Deserialize<'de> for OpMetadata
impl<'de> Deserialize<'de> for OpMetadata
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 OpMetadata
impl RefUnwindSafe for OpMetadata
impl Send for OpMetadata
impl Sync for OpMetadata
impl Unpin for OpMetadata
impl UnsafeUnpin for OpMetadata
impl UnwindSafe for OpMetadata
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