Struct teo_runtime::namespace::Namespace
source · pub struct Namespace {Show 34 fields
pub path: Vec<String>,
pub namespaces: BTreeMap<String, Namespace>,
pub structs: BTreeMap<String, Struct>,
pub models: BTreeMap<String, Model>,
pub enums: BTreeMap<String, Enum>,
pub interfaces: BTreeMap<String, Interface>,
pub model_decorators: BTreeMap<String, Decorator>,
pub model_field_decorators: BTreeMap<String, Decorator>,
pub model_relation_decorators: BTreeMap<String, Decorator>,
pub model_property_decorators: BTreeMap<String, Decorator>,
pub enum_decorators: BTreeMap<String, Decorator>,
pub enum_member_decorators: BTreeMap<String, Decorator>,
pub interface_decorators: BTreeMap<String, Decorator>,
pub interface_field_decorators: BTreeMap<String, Decorator>,
pub handler_decorators: BTreeMap<String, Decorator>,
pub pipeline_items: BTreeMap<String, Item>,
pub middlewares: BTreeMap<String, Definition>,
pub handlers: BTreeMap<String, Handler>,
pub handler_templates: BTreeMap<String, Handler>,
pub model_handler_groups: BTreeMap<String, Group>,
pub handler_groups: BTreeMap<String, Group>,
pub server: Option<Server>,
pub connector: Option<Connector>,
pub clients: BTreeMap<String, Client>,
pub entities: BTreeMap<String, Entity>,
pub debug: Option<Debug>,
pub admin: Option<Admin>,
pub middlewares_block: Option<Block>,
pub database: Option<Database>,
pub connector_reference: Option<Vec<String>>,
pub connection: Option<Arc<dyn Connection>>,
pub middleware_stack: &'static dyn Middleware,
pub handler_map: Map,
pub model_opposite_relations_map: BTreeMap<Vec<String>, Vec<(Vec<String>, String)>>,
}Fields§
§path: Vec<String>§namespaces: BTreeMap<String, Namespace>§structs: BTreeMap<String, Struct>§models: BTreeMap<String, Model>§enums: BTreeMap<String, Enum>§interfaces: BTreeMap<String, Interface>§model_decorators: BTreeMap<String, Decorator>§model_field_decorators: BTreeMap<String, Decorator>§model_relation_decorators: BTreeMap<String, Decorator>§model_property_decorators: BTreeMap<String, Decorator>§enum_decorators: BTreeMap<String, Decorator>§enum_member_decorators: BTreeMap<String, Decorator>§interface_decorators: BTreeMap<String, Decorator>§interface_field_decorators: BTreeMap<String, Decorator>§handler_decorators: BTreeMap<String, Decorator>§pipeline_items: BTreeMap<String, Item>§middlewares: BTreeMap<String, Definition>§handlers: BTreeMap<String, Handler>§handler_templates: BTreeMap<String, Handler>§model_handler_groups: BTreeMap<String, Group>§handler_groups: BTreeMap<String, Group>§server: Option<Server>§connector: Option<Connector>§clients: BTreeMap<String, Client>§entities: BTreeMap<String, Entity>§debug: Option<Debug>§admin: Option<Admin>§middlewares_block: Option<Block>§database: Option<Database>§connector_reference: Option<Vec<String>>§connection: Option<Arc<dyn Connection>>§middleware_stack: &'static dyn Middleware§handler_map: Map§model_opposite_relations_map: BTreeMap<Vec<String>, Vec<(Vec<String>, String)>>Implementations§
source§impl Namespace
impl Namespace
pub fn load_standard_library(&mut self) -> Result<()>
pub fn is_main(&self) -> bool
pub fn is_std(&self) -> bool
pub fn path(&self) -> Vec<&str>
pub fn namespace(&self, name: &str) -> Option<&Namespace>
pub fn namespace_mut(&mut self, name: &str) -> Option<&mut Namespace>
pub fn namespace_mut_or_create(&mut self, name: &str) -> &mut Namespace
pub fn namespace_at_path(&self, path: &Vec<&str>) -> Option<&Namespace>
pub fn namespace_mut_at_path( &mut self, path: &Vec<&str> ) -> Option<&mut Namespace>
pub fn namespace_mut_or_create_at_path( &mut self, path: &Vec<&str> ) -> &mut Namespace
pub fn define_model_decorator<F>(&mut self, name: &str, call: F)
pub fn define_model_field_decorator( &mut self, name: &str, call: impl Fn(Arguments, &mut Field) -> Result<()> + 'static )
pub fn define_model_relation_decorator( &mut self, name: &str, call: impl Fn(Arguments, &mut Relation) -> Result<()> + 'static )
pub fn define_model_property_decorator( &mut self, name: &str, call: impl Fn(Arguments, &mut Property) -> Result<()> + 'static )
pub fn define_enum_decorator( &mut self, name: &str, call: impl Fn(Arguments, &mut Enum) -> Result<()> + 'static )
pub fn define_enum_member_decorator( &mut self, name: &str, call: impl Fn(Arguments, &mut Member) -> Result<()> + 'static )
pub fn define_interface_decorator<F>(&mut self, name: &str, call: F)
pub fn define_handler_decorator( &mut self, name: &str, call: impl Fn(Arguments, &mut Handler) -> Result<()> + 'static )
pub fn define_pipeline_item<T>(&mut self, name: &str, call: T)where
T: Call + 'static,
pub fn define_transform_pipeline_item<A, O, F, R>( &mut self, name: &str, call: F )
pub fn define_validator_pipeline_item<T, F, O>(&mut self, name: &str, call: F)where
T: Send + Sync + 'static,
F: ValidateArgument<T, O> + 'static,
O: Into<ValidateResult> + Send + Sync + 'static,
pub fn define_callback_pipeline_item<T, F, O>(&mut self, name: &str, call: F)where
T: Send + Sync + 'static,
F: CallbackArgument<T, O> + 'static,
O: Into<CallbackResult> + Send + Sync + 'static,
pub fn define_compare_pipeline_item<T, O, F, E>(&mut self, name: &str, call: F)where
T: Send + Sync + 'static,
O: Into<ValidateResult> + Send + Sync + 'static,
E: Into<Error> + Error,
F: CompareArgument<T, O, E> + 'static,
pub fn define_middleware<T>(&mut self, name: &str, call: T)where
T: Creator + 'static,
pub fn define_model_handler_group<T>(&mut self, name: &str, builder: T)
pub fn define_handler<T, F>(&mut self, name: &str, call: F)where
T: 'static,
F: 'static + HandlerCtxArgument<T>,
pub fn define_handler_template<T, F>(&mut self, name: &str, call: F)where
T: 'static,
F: 'static + HandlerCtxArgument<T>,
pub fn define_handler_group<T>(&mut self, name: &str, builder: T)
pub fn define_struct<T>(&mut self, name: &str, builder: T)
pub fn model_decorator_at_path(&self, path: &Vec<&str>) -> Option<&Decorator>
pub fn model_field_decorator_at_path( &self, path: &Vec<&str> ) -> Option<&Decorator>
pub fn model_relation_decorator_at_path( &self, path: &Vec<&str> ) -> Option<&Decorator>
pub fn model_property_decorator_at_path( &self, path: &Vec<&str> ) -> Option<&Decorator>
pub fn enum_decorator_at_path(&self, path: &Vec<&str>) -> Option<&Decorator>
pub fn enum_member_decorator_at_path( &self, path: &Vec<&str> ) -> Option<&Decorator>
pub fn interface_decorator_at_path( &self, path: &Vec<&str> ) -> Option<&Decorator>
pub fn interface_field_decorator_at_path( &self, path: &Vec<&str> ) -> Option<&Decorator>
pub fn handler_decorator_at_path(&self, path: &Vec<&str>) -> Option<&Decorator>
pub fn pipeline_item_at_path(&self, path: &Vec<&str>) -> Option<&Item>
pub fn struct_at_path(&self, path: &Vec<&str>) -> Option<&Struct>
pub fn enum_at_path(&self, path: &Vec<&str>) -> Option<&Enum>
pub fn model_at_path(&self, path: &Vec<&str>) -> Option<&Model>
pub fn interface_at_path(&self, path: &Vec<&str>) -> Option<&Interface>
pub fn middleware_at_path(&self, path: &Vec<&str>) -> Option<&Definition>
pub fn handler_template_at_path(&self, path: &Vec<&str>) -> Option<&Handler>
pub fn handler_at_path(&self, path: &Vec<&str>) -> Option<&Handler>
pub fn replace_handler_template_at_path( &mut self, path: &Vec<&str>, handler: Handler )
pub fn replace_handler_at_path( &mut self, path: &Vec<&str>, handler: Handler, inside_group: bool )
pub fn connector_reference(&self) -> Option<Vec<&str>>
sourcepub fn through_relation(&self, relation: &Relation) -> (&Model, &Relation)
pub fn through_relation(&self, relation: &Relation) -> (&Model, &Relation)
sourcepub fn through_opposite_relation(
&self,
relation: &Relation
) -> (&Model, &Relation)
pub fn through_opposite_relation( &self, relation: &Relation ) -> (&Model, &Relation)
pub fn models_under_connector(&self) -> Vec<&Model>
Trait Implementations§
impl Send for Namespace
impl Sync for Namespace
Auto Trait Implementations§
impl Freeze for Namespace
impl !RefUnwindSafe for Namespace
impl Unpin for Namespace
impl !UnwindSafe for Namespace
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> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.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 moresource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.