pub struct SchemaRegistry { /* private fields */ }Expand description
Global registry of all schema definitions. This is populated at compile time by the proc macros.
Implementations§
Source§impl SchemaRegistry
impl SchemaRegistry
Sourcepub fn new() -> SchemaRegistry
pub fn new() -> SchemaRegistry
Create a new empty registry.
Sourcepub fn register_table(&self, table: TableDef)
pub fn register_table(&self, table: TableDef)
Register a table definition.
Sourcepub fn register_enum(&self, enum_def: EnumDef)
pub fn register_enum(&self, enum_def: EnumDef)
Register an enum definition.
Sourcepub fn register_function(&self, func: FunctionDef)
pub fn register_function(&self, func: FunctionDef)
Register a function definition.
Sourcepub fn get_function(&self, name: &str) -> Option<FunctionDef>
pub fn get_function(&self, name: &str) -> Option<FunctionDef>
Get a function by name.
Sourcepub fn all_tables(&self) -> Vec<TableDef>
pub fn all_tables(&self) -> Vec<TableDef>
Get all registered tables.
Sourcepub fn all_functions(&self) -> Vec<FunctionDef>
pub fn all_functions(&self) -> Vec<FunctionDef>
Get all registered functions.
Trait Implementations§
Source§impl Default for SchemaRegistry
impl Default for SchemaRegistry
Source§fn default() -> SchemaRegistry
fn default() -> SchemaRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SchemaRegistry
impl RefUnwindSafe for SchemaRegistry
impl Send for SchemaRegistry
impl Sync for SchemaRegistry
impl Unpin for SchemaRegistry
impl UnwindSafe for SchemaRegistry
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more