pub trait ToBcs: Serialize {
// Provided methods
fn to_bcs(&self) -> Result<Vec<u8>, Error> { ... }
fn to_bcs_base64(&self) -> Result<String, Error> { ... }
}Available on crate feature
serde only.Provided Methods§
fn to_bcs(&self) -> Result<Vec<u8>, Error>
fn to_bcs_base64(&self) -> Result<String, Error>
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.