Skip to main content

ShapeCheck

Trait ShapeCheck 

Source
pub trait ShapeCheck {
    // Required method
    fn shape_check(path: &str, schema: &Value) -> Result<(), ClientError>;
}
Expand description

What a generated client was built against, checked against a node’s schema: the methods it calls, each by its shape’s hash. The activation macro implements it beside the server half (where the method schemas are), so a client-only build (wasm32) has Untyped::typed_unchecked alone.

Required Methods§

Source

fn shape_check(path: &str, schema: &Value) -> Result<(), ClientError>

Ok when schema — the node at path’s answer to schema — serves every method this client calls under the same shape; else ClientError::ShapeMismatch naming those it does not.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§