pub trait ParseLibrary: XNode {
const LIBRARY: &'static str;
// Required methods
fn extract_element(e: &LibraryElement) -> Option<&Library<Self>>;
fn mk_element(lib: Library<Self>) -> LibraryElement;
}
Expand description
A trait for nodes that can be placed in a library element.
Required Associated Constants§
Required Methods§
Sourcefn extract_element(e: &LibraryElement) -> Option<&Library<Self>>
fn extract_element(e: &LibraryElement) -> Option<&Library<Self>>
Extract the library from a single LibraryElement
.
Sourcefn mk_element(lib: Library<Self>) -> LibraryElement
fn mk_element(lib: Library<Self>) -> LibraryElement
Make a LibraryElement
from a Library
.
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.