pub struct Element {
pub element_type: ElementType,
pub parameters: Vec<ElementParameter>,
}
Expand description
A structure representing a element.
Elements are normally contained in a structure. Elements have a type and maybe some parameters.
Fields§
§element_type: ElementType
The type of the element.
parameters: Vec<ElementParameter>
Vector of parameters.
Implementations§
Source§impl Element
impl Element
Sourcepub fn new() -> Element
pub fn new() -> Element
Creates new element.
The returned element is of type ElementType::None and has an empty set of parameters.
Sourcepub fn to_records(&self) -> Vec<Record>
pub fn to_records(&self) -> Vec<Record>
Creates an vector of records.
Returns a vector of records which can be used for writing the content of the element to a file.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more