pub struct UnitTable {Show 16 fields
pub kind: Option<UnitKind>,
pub types: HashMap<String, Arc<TypeDecl>>,
pub fns: HashMap<String, Arc<FnDecl>>,
pub methods: HashMap<String, MethodTable>,
pub capabilities: HashMap<String, CapabilityDecl>,
pub providers: HashMap<String, ProviderDecl>,
pub services: HashMap<String, ServiceDecl>,
pub agents: HashMap<String, AgentDecl>,
pub removed_agents: Vec<RemovedAgentDecl>,
pub actors: HashMap<String, ActorDecl>,
pub exported_capabilities: HashSet<String>,
pub events: HashMap<String, EventDecl>,
pub assets: HashMap<String, AssetDecl>,
pub embeds: HashMap<String, EmbedDecl>,
pub flattened_caps: HashMap<String, String>,
pub derived: HashMap<String, DerivedInstance>,
}Expand description
Combined symbol tables for a single logical commons or context.
Fields§
§kind: Option<UnitKind>§types: HashMap<String, Arc<TypeDecl>>§fns: HashMap<String, Arc<FnDecl>>§methods: HashMap<String, MethodTable>§capabilities: HashMap<String, CapabilityDecl>Per-context capabilities (v0.5). Empty for commons.
providers: HashMap<String, ProviderDecl>Per-context providers (v0.5). One provider per capability in v0.5. Key: capability name. Value: provider declaration.
services: HashMap<String, ServiceDecl>Per-context services (v0.5). Empty for commons.
agents: HashMap<String, AgentDecl>Per-context agents (v0.5). Empty for commons.
removed_agents: Vec<RemovedAgentDecl>State-migrations S3 (#2248): the context’s removed agent
declarations, across its files.
actors: HashMap<String, ActorDecl>v0.45: actors — boundary contracts consumed by handler by clauses.
exported_capabilities: HashSet<String>v0.15: capability names this context offers to consumers via
exports capability { … }. Empty for commons.
events: HashMap<String, EventDecl>Events track, slice 0 (spine #936): event declarations. Each also
registers into types (via EventDecl::as_type_decl) so ordinary
type-reference/exports/consumes/construction machinery treats it like
any other record type; this table is the separate “is name
specifically an event” answer — owner-only emission and the
from Events(E)/Events.emit[E] “must name a declared event, not
just any type” checks key off it. Empty for commons/adapters
(bynk.event.outside_context rejects it there).
assets: HashMap<String, AssetDecl>#1883, slice 1a: asset declarations, by name — values of the
built-in type Asset, local to this unit. A context or commons only
(bynk.asset.outside_context_or_commons); a unit’s visible assets
add those of the commons it uses (assets::compose_unit_assets).
embeds: HashMap<String, EmbedDecl>#2387, slice 1: embed declarations, by name — String constants
holding a project file’s text, local to this unit. A context or commons
only (bynk.embed.outside_context_or_commons); a unit’s visible embeds
add those of the commons it uses (embeds::compose_unit_embeds).
flattened_caps: HashMap<String, String>#291: the capabilities this unit flattens in with consumes U { Cap },
each mapped to the unit providing it — phase_resolve_consumes’s
per-unit answer, recorded by record_flattened_caps so a test body’s
privileged view sees the target’s platform seams.
derived: HashMap<String, DerivedInstance>S4a (#1966): the derived capabilities (capability Sessions = Kv)
this context declares, by name, once resolved to their base by
crate::project_model::phase_resolve_derived. Each is also in
UnitTable::capabilities, with its base’s operations, so given,
calls and test views treat it as an ordinary capability.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UnitTable
impl RefUnwindSafe for UnitTable
impl Send for UnitTable
impl Sync for UnitTable
impl Unpin for UnitTable
impl UnsafeUnpin for UnitTable
impl UnwindSafe for UnitTable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);