Skip to main content

ToOutput

Trait ToOutput 

Source
pub trait ToOutput {
    // Required method
    fn to_output(&self, output: &mut impl Output);

    // Provided methods
    fn data_hash(&self) -> Hash { ... }
    fn mangle_hash(&self) -> Hash { ... }
    fn output<T: Output + Default>(&self) -> T { ... }
    fn vec(&self) -> Vec<u8>  { ... }
}
Expand description

Values of this type can be uniquely represented as a Vec<u8>.

Required Methods§

Source

fn to_output(&self, output: &mut impl Output)

Provided Methods§

Source

fn data_hash(&self) -> Hash

Source

fn mangle_hash(&self) -> Hash

Source

fn output<T: Output + Default>(&self) -> T

Source

fn vec(&self) -> Vec<u8>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToOutput for Ordering

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl ToOutput for Infallible

Source§

fn to_output(&self, _: &mut impl Output)

Source§

impl ToOutput for bool

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl ToOutput for char

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl ToOutput for i8

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl ToOutput for str

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl ToOutput for u8

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl ToOutput for ()

Source§

fn to_output(&self, _: &mut impl Output)

Source§

impl ToOutput for CString

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl ToOutput for String

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl ToOutput for CStr

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl ToOutput for NonZero<i8>

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl ToOutput for NonZero<u8>

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl ToOutput for Ulid

Available on crate feature ulid only.
Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<'a, B: 'a + ToOwned + ToOutput + ?Sized> ToOutput for Cow<'a, B>

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<A, O: BitOrder> ToOutput for BitArray<A, O>

Available on crate feature bitvec only.
Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: InlineOutput, F: InlineOutput, G: InlineOutput, H: InlineOutput, I: InlineOutput, J: InlineOutput, K: InlineOutput, L: ToOutput> ToOutput for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: InlineOutput, F: InlineOutput, G: InlineOutput, H: InlineOutput, I: InlineOutput, J: InlineOutput, K: ToOutput> ToOutput for (A, B, C, D, E, F, G, H, I, J, K)

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: InlineOutput, F: InlineOutput, G: InlineOutput, H: InlineOutput, I: InlineOutput, J: ToOutput> ToOutput for (A, B, C, D, E, F, G, H, I, J)

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: InlineOutput, F: InlineOutput, G: InlineOutput, H: InlineOutput, I: ToOutput> ToOutput for (A, B, C, D, E, F, G, H, I)

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: InlineOutput, F: InlineOutput, G: InlineOutput, H: ToOutput> ToOutput for (A, B, C, D, E, F, G, H)

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: InlineOutput, F: InlineOutput, G: ToOutput> ToOutput for (A, B, C, D, E, F, G)

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: InlineOutput, F: ToOutput> ToOutput for (A, B, C, D, E, F)

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: ToOutput> ToOutput for (A, B, C, D, E)

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: ToOutput> ToOutput for (A, B, C, D)

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<A: InlineOutput, B: InlineOutput, C: ToOutput> ToOutput for (A, B, C)

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<A: InlineOutput, B: ToOutput> ToOutput for (A, B)

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<K: InlineOutput, V: InlineOutput> ToOutput for BTreeMap<K, V>

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<T> ToOutput for dyn Send + Sync + ExtraFor<T>

Source§

fn to_output(&self, _: &mut impl Output)

Source§

impl<T: InlineOutput> ToOutput for [T]

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<T: InlineOutput> ToOutput for BTreeSet<T>

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<T: InlineOutput> ToOutput for VecDeque<T>

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<T: InlineOutput> ToOutput for Vec<T>

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<T: InlineOutput, N: ArrayLength> ToOutput for GenericArray<T, N>

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<T: InlineOutput, const N: usize> ToOutput for [T; N]

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<T: ToOutput + TaggedOption> ToOutput for Option<T>

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<T: ToOutput> ToOutput for (T,)

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<T: ?Sized + ToOutput> ToOutput for &T

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<T: ?Sized + ToOutput> ToOutput for Box<T>

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<T: ?Sized + ToOutput> ToOutput for Arc<T>

Source§

fn to_output(&self, output: &mut impl Output)

Source§

impl<T: ?Sized> ToOutput for PhantomData<T>

Source§

fn to_output(&self, _: &mut impl Output)

Implementors§