pub struct SharedOrganRuntime { /* private fields */ }Expand description
Runtime sharing organ functions across profiles: profiles may call a function defined by another profile only when both use the function’s organ.
Implementations§
Sourcepub fn register_profile(&mut self, profile: LanguageProfile) -> Result<()>
pub fn register_profile(&mut self, profile: LanguageProfile) -> Result<()>
Register a profile so its organs and functions become available.
Sourcepub fn profile(&self, symbol: &Symbol) -> Option<&LanguageProfile>
pub fn profile(&self, symbol: &Symbol) -> Option<&LanguageProfile>
Look up a registered profile by symbol.
Sourcepub fn profiles(&self) -> impl Iterator<Item = &LanguageProfile>
pub fn profiles(&self) -> impl Iterator<Item = &LanguageProfile>
Iterate the registered profiles.
Sourcepub fn define_function(
&mut self,
defining_profile: &Symbol,
organ: Symbol,
function: Symbol,
value: Value,
) -> Result<()>
pub fn define_function( &mut self, defining_profile: &Symbol, organ: Symbol, function: Symbol, value: Value, ) -> Result<()>
Define a callable function in organ, attributed to defining_profile.
Fails if the profile does not use the organ, the value is not callable, or the function name is already defined.
Sourcepub fn function(&self, function: &Symbol) -> Option<&ProfileFunctionBinding>
pub fn function(&self, function: &Symbol) -> Option<&ProfileFunctionBinding>
Look up a defined function by symbol.
Trait Implementations§
Source§fn clone(&self) -> SharedOrganRuntime
fn clone(&self) -> SharedOrganRuntime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§fn default() -> SharedOrganRuntime
fn default() -> SharedOrganRuntime
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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