pub trait BinaryEncodable {
// Required method
fn encode<W: Write + ?Sized>(
&self,
out: &mut W,
ctx: &Context<'_>,
) -> Result<(), StatusCode>;
// Provided method
fn encoded_len(&self, ctx: &Context<'_>) -> Result<usize, StatusCode> { ... }
}Expand description
Encode a value using OPC UA Part 6 binary encoding.
Required Methods§
fn encode<W: Write + ?Sized>( &self, out: &mut W, ctx: &Context<'_>, ) -> Result<(), StatusCode>
Provided Methods§
Sourcefn encoded_len(&self, ctx: &Context<'_>) -> Result<usize, StatusCode>
fn encoded_len(&self, ctx: &Context<'_>) -> Result<usize, StatusCode>
Measure the encoded value under the same limits used when writing it.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".