pub trait ToOutput {
// Required method
fn to_output(&self, output: &mut (impl ?Sized + Output));
// Provided methods
fn hasher(&self) -> Sha256 { ... }
fn data_hash(&self) -> Hash { ... }
fn mangle_hash(&self) -> Hash { ... }
fn output<T: FromOutput<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§
Provided Methods§
Sourcefn mangle_hash(&self) -> Hash
fn mangle_hash(&self) -> Hash
“Mangle hash” of the object. This is used to introduce runtime distinction between
data-identical objects similarly to compile-time Tagged::HASH.
Sourcefn output<T: FromOutput<Output: Default>>(&self) -> T
fn output<T: FromOutput<Output: Default>>(&self) -> T
Construct an Output, possibly finalising it afterwards.
For an example of a FromOutput see [Hash].
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
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)
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§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)
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§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)
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§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)
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§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)
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§impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: InlineOutput, F: InlineOutput, G: ToOutput> ToOutput for (A, B, C, D, E, F, G)
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§impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: InlineOutput, F: ToOutput> ToOutput for (A, B, C, D, E, F)
impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: InlineOutput, F: ToOutput> ToOutput for (A, B, C, D, E, F)
Source§impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: ToOutput> ToOutput for (A, B, C, D, E)
impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: InlineOutput, E: ToOutput> ToOutput for (A, B, C, D, E)
Source§impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: ToOutput> ToOutput for (A, B, C, D)
impl<A: InlineOutput, B: InlineOutput, C: InlineOutput, D: ToOutput> ToOutput for (A, B, C, D)
Source§impl<A: InlineOutput, B: InlineOutput, C: ToOutput> ToOutput for (A, B, C)
impl<A: InlineOutput, B: InlineOutput, C: ToOutput> ToOutput for (A, B, C)
Source§impl<K: InlineOutput, V: InlineOutput> ToOutput for BTreeMap<K, V>
impl<K: InlineOutput, V: InlineOutput> ToOutput for BTreeMap<K, V>
Source§impl<K: InlineOutput, V: InlineOutput> ToOutput for IndexMap<K, V>
Available on crate feature indexmap only.
impl<K: InlineOutput, V: InlineOutput> ToOutput for IndexMap<K, V>
Available on crate feature
indexmap only.Source§impl<T: ?Sized> ToOutput for PhantomData<T>
impl<T: ?Sized> ToOutput for PhantomData<T>
Source§impl<T: InlineOutput, N: ArrayLength> ToOutput for GenericArray<T, N>
impl<T: InlineOutput, N: ArrayLength> ToOutput for GenericArray<T, N>
Source§impl<T: InlineOutput> ToOutput for BTreeSet<T>
impl<T: InlineOutput> ToOutput for BTreeSet<T>
Source§impl<T: InlineOutput> ToOutput for IndexSet<T>
Available on crate feature indexmap only.
impl<T: InlineOutput> ToOutput for IndexSet<T>
Available on crate feature
indexmap only.Source§impl<T: InlineOutput> ToOutput for Vec<T>
impl<T: InlineOutput> ToOutput for Vec<T>
Source§impl<T: InlineOutput> ToOutput for VecDeque<T>
impl<T: InlineOutput> ToOutput for VecDeque<T>
Source§impl<T: InlineOutput> ToOutput for [T]
impl<T: InlineOutput> ToOutput for [T]
Source§impl<T> ToOutput for Option<T>where
T: OptionOutput,
impl<T> ToOutput for Option<T>where
T: OptionOutput,
Source§impl<const S: usize> ToOutput for CidGeneric<S>
Available on crate feature cid only.
impl<const S: usize> ToOutput for CidGeneric<S>
Available on crate feature
cid only.Implementors§
impl ToOutput for Address
The only valid connection between an Address and serialisation is in its [Hash].
impl ToOutput for AddressedByteswhere
Address: InlineOutput,
impl ToOutput for Be<NonZero<i8>>
impl ToOutput for Be<NonZero<i16>>
impl ToOutput for Be<NonZero<i32>>
impl ToOutput for Be<NonZero<i64>>
impl ToOutput for Be<NonZero<i128>>
impl ToOutput for Be<NonZero<u8>>
impl ToOutput for Be<NonZero<u16>>
impl ToOutput for Be<NonZero<u32>>
impl ToOutput for Be<NonZero<u64>>
impl ToOutput for Be<NonZero<u128>>
impl ToOutput for Be<f32>
impl ToOutput for Be<f64>
impl ToOutput for Be<i8>
impl ToOutput for Be<i16>
impl ToOutput for Be<i32>
impl ToOutput for Be<i64>
impl ToOutput for Be<i128>
impl ToOutput for Be<u8>
impl ToOutput for Be<u16>
impl ToOutput for Be<u32>
impl ToOutput for Be<u64>
impl ToOutput for Be<u128>
impl ToOutput for DiffHasheswhere
Hash: InlineOutput,
impl ToOutput for Ff
impl ToOutput for Hash
impl ToOutput for Le<NonZero<i8>>
impl ToOutput for Le<NonZero<i16>>
impl ToOutput for Le<NonZero<i32>>
impl ToOutput for Le<NonZero<i64>>
impl ToOutput for Le<NonZero<i128>>
impl ToOutput for Le<NonZero<u8>>
impl ToOutput for Le<NonZero<u16>>
impl ToOutput for Le<NonZero<u32>>
impl ToOutput for Le<NonZero<u64>>
impl ToOutput for Le<NonZero<u128>>
impl ToOutput for Le<f32>
impl ToOutput for Le<f64>
impl ToOutput for Le<i8>
impl ToOutput for Le<i16>
impl ToOutput for Le<i32>
impl ToOutput for Le<i64>
impl ToOutput for Le<i128>
impl ToOutput for Le<u8>
impl ToOutput for Le<u16>
impl ToOutput for Le<u32>
impl ToOutput for Le<u64>
impl ToOutput for Le<u128>
impl ToOutput for LpBytes
impl ToOutput for LpString
impl ToOutput for NicheCut
impl ToOutput for OptionalHash
impl ToOutput for U63
impl ToOutput for dyn Resolve + '_
No-op matching the ParseInline.
impl ToOutput for dyn Singular + '_
impl<'a, T: ?Sized> ToOutput for WithHash<'a, T>
impl<A: InlineOutput + Default + PartialEq, B: ToOutput + Default> ToOutput for DefaultChain<A, B>
impl<A: ToOutput, B: ToOutput> ToOutput for TupleOfArrays<A, B>
impl<Extra> ToOutput for Extras<Extra>
impl<Extra> ToOutput for InlineExtra<Extra>where
Extra: ToOutput,
impl<F> ToOutput for FetchExtra<F>where
F: ToOutput,
impl<K> ToOutput for PartialByteTag<K>
impl<M> ToOutput for SmExtra<M>
impl<T, A: Default + InlineOutput> ToOutput for Dt<T, A>
impl<T, E> ToOutput for Ent<T, E>
impl<T, E> ToOutput for ExtraArray<T, E>
impl<T, Extra> ToOutput for Addressed<T, Extra>
impl<T, M> ToOutput for MappedExtra<T, M>where
M: InlineOutput,
T: ToOutput,
impl<T, const MAX: usize> ToOutput for EnumTag<T, MAX>where
T: ToOutput,
impl<T: ?Sized + ToOutput> ToOutput for Mangled<T>
impl<T: ?Sized> ToOutput for ObjectMarker<T>
impl<T: AsRef<str>> ToOutput for NtString<T>
impl<T: ExtraNoneOutput<E>, E> ToOutput for ExtraOption<T, E>
impl<T: InlineOutput> ToOutput for LpVec<T>
impl<T: ListHashes> ToOutput for Hashes<T>
impl<T: ToOutput> ToOutput for Hashed<T>
impl<T: ToOutput> ToOutput for Lp<T>
impl<T: ToOutput> ToOutput for ParseExtra<T>
impl<T: ToOutput> ToOutput for WithRepr<T>
impl<T: ToOutput> ToOutput for Zt<T>
impl<T> ToOutput for AssertRefless<T>where
T: ToOutput,
impl<T> ToOutput for Local<T>where
T: ToOutput,
impl<T> ToOutput for Nt<T>
impl<T> ToOutput for RuntimeArray<T>
impl<T> ToOutput for Sequence<T>
impl<T> ToOutput for dyn Fetch<T = T> + '_
Even though we refer to something, we don’t know [Hash] for it. To match correctness, we don’t
implement Parse/ParseInline.