pub struct SimpleExtensions { /* private fields */ }Available on crate feature
parse only.Expand description
The contents (types) 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.
Currently, only the CustomTypes are included; any scalar, window, or
aggregate functions are not yet included.
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 has_type(&self, name: &str) -> bool
pub fn has_type(&self, name: &str) -> bool
Check if a type with the given name exists in the context
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
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§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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)