pub struct Structure { /* private fields */ }
Implementations§
Source§impl Structure
impl Structure
Sourcepub fn create(
domain: BTreeSet<String>,
reserved: BTreeSet<String>,
definitions: Vec<Definition>,
) -> Result<Self, StructureError>
pub fn create( domain: BTreeSet<String>, reserved: BTreeSet<String>, definitions: Vec<Definition>, ) -> Result<Self, StructureError>
Create a new structure.
It is not called new
because it can fail and using new
with Result
is confusing.
Sourcepub fn intrinsic() -> Self
pub fn intrinsic() -> Self
The “intrinsic” structure is defined by the language itself
It reserves curly braces, parentheses, and commas.
pub fn get_reserved(&self) -> &BTreeSet<String>
pub fn get_domain(&self) -> &BTreeSet<String>
Trait Implementations§
impl Eq for Structure
impl StructuralPartialEq for Structure
Auto Trait Implementations§
impl Freeze for Structure
impl RefUnwindSafe for Structure
impl Send for Structure
impl Sync for Structure
impl Unpin for Structure
impl UnwindSafe for Structure
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