GitModuleOp

Struct GitModuleOp 

Source
pub struct GitModuleOp { /* private fields */ }
Expand description

Provides access to module in a remote git repo, from within MeTTa code Similar to register-module!, this op will bypass the catalog search

NOTE: Even if Hyperon is build without git support, this operation may still be used to load existing modules from a git cache. That situation may occur if modules were fetched earlier or by another tool that manages the module cache. However this operation requres git support to actually clone or pull from a git repository.

Implementations§

Source§

impl GitModuleOp

Source

pub fn new(metta: Metta) -> Self

Trait Implementations§

Source§

impl Clone for GitModuleOp

Source§

fn clone(&self) -> GitModuleOp

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CustomExecute for GitModuleOp

Source§

fn execute(&self, args: &[Atom]) -> Result<Vec<Atom>, ExecError>

Executes grounded function on passed args and returns list of results as Vec<Atom> or [ExecError]. This is a restricted version of the [CustomExecute::execute_bindings] method which is implemented if returning of variable bindings is not required.
§

fn execute_bindings( &self, args: &[Atom], ) -> Result<Box<dyn Iterator<Item = (Atom, Option<Bindings>)>>, ExecError>

Executes grounded function on passed args and returns list of results with associated variable bindings if there are ones. Default implementation calls [CustomExecute::execute] and returns no bindings.
Source§

impl Debug for GitModuleOp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for GitModuleOp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Grounded for GitModuleOp

Source§

fn type_(&self) -> Atom

Returns type of the grounded atom. Should return same type each time it is called. [rust_type_atom] function can be used to implement default behavior if required.
Source§

fn as_execute(&self) -> Option<&dyn CustomExecute>

Returns reference to the custom execution API implementation. If None is returned then atom is not executable. See [CustomExecute] for details.
§

fn as_match(&self) -> Option<&dyn CustomMatch>

Returns reference to the custom matching API implementation. If None is returned then atom is matched by equality. See [CustomMatch] for details.
§

fn serialize(&self, _serializer: &mut dyn Serializer) -> Result<(), Error>

Implements serialization logic of the grounded atom. The logic is implemented in terms of the Rust native types. See [serial] for details.
Source§

impl PartialEq for GitModuleOp

Source§

fn eq(&self, _other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<T> RefOrMove<T> for T

§

fn as_value(self) -> T

§

fn as_ref(&self) -> &T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> AutoGroundedType for T
where T: 'static + PartialEq + Clone + Debug,

§

impl<T> CustomGroundedType for T
where T: AutoGroundedType + Display + Grounded,