pub trait FromAttributes: Sized {
// Required method
fn from_attributes<'a, I>(attrs: I, max_attr_length: usize) -> Option<Self>
where I: Iterator<Item = Attribute<'a>>;
}Expand description
Trait for types that can be built from XML attributes
Implement this trait for structs that are parsed from XML element attributes, providing a consistent interface for attribute extraction with limit validation.
Required Methods§
Sourcefn from_attributes<'a, I>(attrs: I, max_attr_length: usize) -> Option<Self>
fn from_attributes<'a, I>(attrs: I, max_attr_length: usize) -> Option<Self>
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.