Skip to main content

Binary

Trait Binary 

Source
pub trait Binary<D: Dialect> {
    // Required method
    fn format_scalar<Lhs: Component<D>, Rhs: Component<D>>(
        f: &mut Formatter<'_>,
        lhs: Lhs,
        rhs: Rhs,
        item: Item<D>,
    ) -> Result;

    // Provided methods
    fn format(
        f: &mut Formatter<'_>,
        lhs: &Value<D>,
        rhs: &Value<D>,
        out: &Value<D>,
    ) -> Result { ... }
    fn unroll_vec(
        f: &mut Formatter<'_>,
        lhs: &Value<D>,
        rhs: &Value<D>,
        out: &Value<D>,
    ) -> Result { ... }
    fn can_optimize() -> bool { ... }
}

Required Methods§

Source

fn format_scalar<Lhs: Component<D>, Rhs: Component<D>>( f: &mut Formatter<'_>, lhs: Lhs, rhs: Rhs, item: Item<D>, ) -> Result

Provided Methods§

Source

fn format( f: &mut Formatter<'_>, lhs: &Value<D>, rhs: &Value<D>, out: &Value<D>, ) -> Result

Source

fn unroll_vec( f: &mut Formatter<'_>, lhs: &Value<D>, rhs: &Value<D>, out: &Value<D>, ) -> Result

Source

fn can_optimize() -> bool

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§