pub struct MettaMod { /* private fields */ }Expand description
Contains state associated with a loaded MeTTa module
Implementations§
Source§impl MettaMod
impl MettaMod
Sourcepub fn contains_imported_dep(&self, mod_id: &ModId) -> bool
pub fn contains_imported_dep(&self, mod_id: &ModId) -> bool
Returns true if the self module has imported the mod_id module as a sub-dependency
Sourcepub fn path(&self) -> &str
pub fn path(&self) -> &str
Returns the full path of a loaded module. For example: “top:parent_mod:this_mod”
Sourcepub fn pkg_info(&self) -> Option<&PkgInfo>
pub fn pkg_info(&self) -> Option<&PkgInfo>
Returns a reference to the module’s PkgInfo, if it has one
pub fn space(&self) -> DynSpace
pub fn tokenizer(&self) -> &Shared<Tokenizer>
pub fn resource_dir(&self) -> Option<&Path>
pub fn get_resource(&self, res_key: ResourceKey<'_>) -> Result<Resource, String>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MettaMod
impl !RefUnwindSafe for MettaMod
impl !Send for MettaMod
impl !Sync for MettaMod
impl Unpin for MettaMod
impl !UnwindSafe for MettaMod
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
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request