pub trait Attribute<'a> {
type Error: Debug;
type Item;
const TYPE: AttributeType;
// Required method
fn deserialize(
bytes: &'a [u8],
transaction_id: &'a [u8],
) -> Result<Self::Item, Self::Error>;
// Provided method
fn serialize<B: BufMut>(
value: Self::Item,
bytes: &mut B,
transaction_id: &'a [u8],
) { ... }
}Expand description
dyn stun/turn message attribute.
Required Associated Constants§
Sourceconst TYPE: AttributeType
const TYPE: AttributeType
current attribute type.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".