pub trait Jet:
DynJet
+ Debug
+ Display
+ Send
+ Sync
+ 'static {
// Required methods
fn cmr(&self) -> Cmr;
fn source_ty(&self) -> TypeName;
fn target_ty(&self) -> TypeName;
fn encode(&self, w: &mut BitWriter<&mut dyn Write>) -> Result<usize>;
fn decode<I: Iterator<Item = u8>>(
bits: &mut BitIter<I>,
) -> Result<Self, Error>
where Self: Sized;
fn cost(&self) -> Cost;
fn parse(s: &str) -> Result<Self, Error>
where Self: Sized;
}Expand description
Family of jets that share an encoding scheme and execution environment.
Jets are single nodes that read an input, process it internally using foreign C code (black box), and produce an output. Jets may read values from their environment.
Jets are always leaves in a Simplicity DAG.
Required Methods§
Trait Implementations§
Source§impl Ord for Box<dyn Jet>
impl Ord for Box<dyn Jet>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Box<dyn Jet>
impl PartialOrd for Box<dyn Jet>
impl Eq for Box<dyn Jet>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".