Skip to main content

ConsumerTypeCodec

Trait ConsumerTypeCodec 

Source
pub trait ConsumerTypeCodec: Send + Sync {
    // Required methods
    fn parse(&self, value: &str) -> Result<Vec<Felt>>;
    fn display(&self, felts: &[Felt]) -> Result<String>;
    fn validate(&self, felts: &[Felt]) -> Result<()>;
}
Expand description

Parses, displays, and validates one fully-qualified WIT leaf type.

Required Methods§

Source

fn parse(&self, value: &str) -> Result<Vec<Felt>>

Parses a string into its structural felt representation.

Source

fn display(&self, felts: &[Felt]) -> Result<String>

Displays a structurally valid felt representation.

Source

fn validate(&self, felts: &[Felt]) -> Result<()>

Validates the felt representation and any semantic type constraints.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§