pub trait AttributeFromRaw<'a>: Attribute {
// Required method
fn from_raw_ref(raw: &RawAttribute<'_>) -> Result<Self, StunParseError>
where Self: Sized;
// Provided method
fn from_raw(raw: RawAttribute<'a>) -> Result<Self, StunParseError>
where Self: Sized { ... }
}Expand description
A trait for converting from a RawAttribute to a concrete Attribute.
Required Methods§
Sourcefn from_raw_ref(raw: &RawAttribute<'_>) -> Result<Self, StunParseError>where
Self: Sized,
fn from_raw_ref(raw: &RawAttribute<'_>) -> Result<Self, StunParseError>where
Self: Sized,
Produce an Attribute from a RawAttribute.
Provided Methods§
Sourcefn from_raw(raw: RawAttribute<'a>) -> Result<Self, StunParseError>where
Self: Sized,
fn from_raw(raw: RawAttribute<'a>) -> Result<Self, StunParseError>where
Self: Sized,
Produce an Attribute from a RawAttribute.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".