pub trait ReadConstructor: Send + Sync {
// Required methods
fn symbol(&self) -> Symbol;
fn args_shape(&self, cx: &mut Cx) -> Result<ShapeRef>;
fn construct_read(&self, cx: &mut Cx, args: Vec<Value>) -> Result<Value>;
}Expand description
Contract: a read-time constructor that builds an object from read args.
The kernel defines the contract; libraries register concrete constructors that the reader invokes to build values from forms.
Required Methods§
Sourcefn args_shape(&self, cx: &mut Cx) -> Result<ShapeRef>
fn args_shape(&self, cx: &mut Cx) -> Result<ShapeRef>
The shape the constructor’s arguments must match.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".