pub trait TranscriptBuilderInput {
const TYPE: &'static str;
// Required method
fn to_transcript_builder_input(&self) -> Vec<u8> ⓘ;
}Expand description
TranscriptBuilderInput is a trait that provides an interface for any data
that can be passed as input to the TranscriptBuilder. Implementers of this trait
should provide a unique type identifier and a method to return serialized bytes for the data.
§Examples
use ink_quill::TranscriptBuilderInput;
struct MyData {
value: u64,
}
impl TranscriptBuilderInput for MyData {
const TYPE: &'static str = "MyData";
fn to_transcript_builder_input(&self) -> Vec<u8> {
self.value.to_be_bytes().to_vec()
}
}Required Associated Constants§
Required Methods§
Sourcefn to_transcript_builder_input(&self) -> Vec<u8> ⓘ
fn to_transcript_builder_input(&self) -> Vec<u8> ⓘ
Return serialized bytes for the current data.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".