pub struct SimpleExtensions { /* private fields */ }Available on crate feature
parse only.Expand description
The contents (types and functions) in an ExtensionFile.
This structure stores and provides access to the individual objects defined
in an ExtensionFile; SimpleExtensions
represents the contents of an extensions file.
Implementations§
Source§impl SimpleExtensions
impl SimpleExtensions
Sourcepub fn add_type(
&mut self,
custom_type: &CustomType,
) -> Result<(), SimpleExtensionsError>
pub fn add_type( &mut self, custom_type: &CustomType, ) -> Result<(), SimpleExtensionsError>
Add a type to the context. Name must be unique.
Sourcepub fn get_type(&self, name: &str) -> Option<&CustomType>
pub fn get_type(&self, name: &str) -> Option<&CustomType>
Get a type by name from the context
Sourcepub fn types(&self) -> impl Iterator<Item = &CustomType>
pub fn types(&self) -> impl Iterator<Item = &CustomType>
Get an iterator over all types in the context
Sourcepub fn get_scalar_function(&self, name: &str) -> Option<&ScalarFunction>
pub fn get_scalar_function(&self, name: &str) -> Option<&ScalarFunction>
Get a scalar function by name
Sourcepub fn scalar_functions(&self) -> impl Iterator<Item = &ScalarFunction>
pub fn scalar_functions(&self) -> impl Iterator<Item = &ScalarFunction>
Get an iterator over all scalar functions
Trait Implementations§
Source§impl Clone for SimpleExtensions
impl Clone for SimpleExtensions
Source§fn clone(&self) -> SimpleExtensions
fn clone(&self) -> SimpleExtensions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimpleExtensions
impl Debug for SimpleExtensions
Source§impl Default for SimpleExtensions
impl Default for SimpleExtensions
Source§fn default() -> SimpleExtensions
fn default() -> SimpleExtensions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SimpleExtensions
impl RefUnwindSafe for SimpleExtensions
impl Send for SimpleExtensions
impl Sync for SimpleExtensions
impl Unpin for SimpleExtensions
impl UnwindSafe for SimpleExtensions
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