Trait sigma_fun::Writable

source ·
pub trait Writable {
    // Required method
    fn write_to<W: Write>(&self, w: &mut W) -> Result;
}
Expand description

Utility trait for something that can be written as a string.

This is basically like core::fmt::Display except the thing being written to does not have to be a Formatter. This is useful because we write the names of Sigma protocols to a hash input but also use Writable implementation to implement core::fmt::Display.

Required Methods§

source

fn write_to<W: Write>(&self, w: &mut W) -> Result

Asks the thing to write itself to W.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Writable for str

source§

fn write_to<W: Write>(&self, w: &mut W) -> Result

Implementors§

source§

impl<A: Writable, B: Writable> Writable for And<A, B>

source§

impl<A: Writable, B: Writable> Writable for Eq<A, B>

source§

impl<A: Writable, B: Writable> Writable for Or<A, B>

source§

impl<L> Writable for sigma_fun::ed25519::DL<L>

Available on crate feature ed25519 only.
source§

impl<L> Writable for sigma_fun::ed25519::DLG<L>

Available on crate feature ed25519 only.
source§

impl<L> Writable for sigma_fun::secp256k1::DL<L>

Available on crate feature secp256k1 only.
source§

impl<L> Writable for sigma_fun::secp256k1::DLG<L>

Available on crate feature secp256k1 only.
source§

impl<S: Sigma, N: Unsigned> Writable for EqAll<S, N>

source§

impl<S: Writable, N: Unsigned> Writable for All<S, N>