Struct volo_build::Context
source · pub struct Context {
pub source_type: SourceType,
pub db: Snapshot<RootDatabase>,
pub adjusts: Arc<DashMap<DefId, Adjust>>,
pub services: Arc<[IdlService]>,
pub location_map: HashMap<DefId, DefLocation, BuildHasherDefault<FxHasher>>,
pub entry_map: HashMap<DefLocation, Vec<(DefId, DefLocation)>>,
pub plugin_gen: DashMap<DefLocation, String>,
/* private fields */
}
Fields§
§source_type: SourceType
§db: Snapshot<RootDatabase>
§adjusts: Arc<DashMap<DefId, Adjust>>
§services: Arc<[IdlService]>
§location_map: HashMap<DefId, DefLocation, BuildHasherDefault<FxHasher>>
§entry_map: HashMap<DefLocation, Vec<(DefId, DefLocation)>>
§plugin_gen: DashMap<DefLocation, String>
Implementations§
source§impl Context
impl Context
pub fn with_adjust<T, F>(&self, def_id: DefId, f: F) -> T
pub fn with_adjust_mut<T, F>(&self, def_id: DefId, f: F) -> T
pub fn contains_tag<T>(&self, tags_id: TagId) -> boolwhere
T: 'static,
pub fn node_contains_tag<T>(&self, def_id: DefId) -> boolwhere
T: 'static,
pub fn symbol_name(&self, def_id: DefId) -> Symbol
pub fn default_val(&self, f: &Field) -> Option<(FastStr, bool)>
pub fn rust_name(&self, def_id: DefId) -> Symbol
pub fn mod_path(&self, def_id: DefId) -> Arc<[Symbol]>
pub fn item_path(&self, def_id: DefId) -> Arc<[Symbol]>
pub fn exec_plugin<P>(&self, p: P)where
P: Plugin,
pub fn config(&self, crate_id: &CrateId) -> &Value
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Context
impl !RefUnwindSafe for Context
impl Send for Context
impl !Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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