Struct uvls::core::module::ConfigModule
source · pub struct ConfigModule {
pub module: Arc<Module>,
pub values: HashMap<ModuleSymbol, ConfigValue>,
pub source_map: HashMap<ModuleSymbol, Range<usize>>,
}
Expand description
Configuration with a module and resolved configuration symboles
Fields§
§module: Arc<Module>
§values: HashMap<ModuleSymbol, ConfigValue>
§source_map: HashMap<ModuleSymbol, Range<usize>>
Implementations§
source§impl ConfigModule
impl ConfigModule
fn serialize_rec(&self, path: &[Ustr], i: InstanceID) -> ConfigEntry
sourcefn serialize_rec_file(
&self,
sym: Symbol,
file: &AstDocument,
i: InstanceID,
) -> Vec<ConfigEntry>
fn serialize_rec_file( &self, sym: Symbol, file: &AstDocument, i: InstanceID, ) -> Vec<ConfigEntry>
serialize file recursive while accommodate for cardinality
sourcepub fn serialize(&self) -> Vec<ConfigEntry>
pub fn serialize(&self) -> Vec<ConfigEntry>
Turns a the set of linear configuration values of this module into theire recusive from used in json
Methods from Deref<Target = Module>§
pub fn get_instance(&self, instance: InstanceID, sym: Symbol) -> InstanceID
sourcepub fn resolve_value(&self, src_sym: ModuleSymbol) -> ModuleSymbol
pub fn resolve_value(&self, src_sym: ModuleSymbol) -> ModuleSymbol
Resolves references inside this module
sourcepub fn resolve_config<E: FnMut(Range<usize>, String)>(
&self,
doc: &Vec<ConfigEntry>,
err: E,
) -> (HashMap<ModuleSymbol, ConfigValue>, HashMap<ModuleSymbol, Range<usize>>)
pub fn resolve_config<E: FnMut(Range<usize>, String)>( &self, doc: &Vec<ConfigEntry>, err: E, ) -> (HashMap<ModuleSymbol, ConfigValue>, HashMap<ModuleSymbol, Range<usize>>)
Bind a recursive configuration doc to a linear set of symbols Add layer for cardinality
pub fn file(&self, instance: InstanceID) -> &AstDocument
pub fn type_of(&self, sym: ModuleSymbol) -> Type
sourcepub fn instances<'a>(
&'a self,
) -> impl Iterator<Item = (InstanceID, &'a AstDocument)>
pub fn instances<'a>( &'a self, ) -> impl Iterator<Item = (InstanceID, &'a AstDocument)>
Visit all instances in the module
pub fn instances_depth<'a>( &'a self, ) -> impl Iterator<Item = (ModuleSymbol, InstanceID, &'a AstDocument, u32)>
Trait Implementations§
source§impl Clone for ConfigModule
impl Clone for ConfigModule
source§fn clone(&self) -> ConfigModule
fn clone(&self) -> ConfigModule
Returns a copy 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 ConfigModule
impl Debug for ConfigModule
Auto Trait Implementations§
impl Freeze for ConfigModule
impl RefUnwindSafe for ConfigModule
impl Send for ConfigModule
impl Sync for ConfigModule
impl Unpin for ConfigModule
impl UnwindSafe for ConfigModule
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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