pub struct Validator;Expand description
Stateless structural validator.
Implementations§
Source§impl Validator
impl Validator
Sourcepub fn validate_connection(
output: &Port,
input: &Port,
) -> Result<(), WeaveError>
pub fn validate_connection( output: &Port, input: &Port, ) -> Result<(), WeaveError>
Validate that output and input can be connected.
Checks:
outputmust have directionOutput.inputmust have directionInput.- The output type must be compatible with the input type.
Sourcepub fn validate_block(
block: &Block,
schema: &BlockSchema,
) -> Result<(), WeaveError>
pub fn validate_block( block: &Block, schema: &BlockSchema, ) -> Result<(), WeaveError>
Validate that a block’s atom list is non-empty and its schema is valid.
Auto Trait Implementations§
impl Freeze for Validator
impl RefUnwindSafe for Validator
impl Send for Validator
impl Sync for Validator
impl Unpin for Validator
impl UnsafeUnpin for Validator
impl UnwindSafe for Validator
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