Struct swipl::callable::CallablePredicate
source · pub struct CallablePredicate<const N: usize> { /* private fields */ }
Expand description
A prolog predicate which is ready to be called.
Implementations§
source§impl<const N: usize> CallablePredicate<N>
impl<const N: usize> CallablePredicate<N>
sourcepub unsafe fn wrap(predicate: predicate_t) -> Self
pub unsafe fn wrap(predicate: predicate_t) -> Self
Wrap a predicate_t
from the SWI-Prolog fli, not checking if arity matches.
Safety
This is only safe if the given predicate is in fact a predicate in SWI-Prolog.
Trait Implementations§
source§impl<const N: usize> Callable<N> for CallablePredicate<N>
impl<const N: usize> Callable<N> for CallablePredicate<N>
type ContextType = OpenQuery
fn open<'a, C: ContextType>( self, context: &'a Context<'_, C>, module: Option<Module>, args: [&Term<'_>; N] ) -> Context<'a, Self::ContextType>
source§impl<const N: usize> Clone for CallablePredicate<N>
impl<const N: usize> Clone for CallablePredicate<N>
source§fn clone(&self) -> CallablePredicate<N>
fn clone(&self) -> CallablePredicate<N>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<const N: usize> Copy for CallablePredicate<N>
Auto Trait Implementations§
impl<const N: usize> RefUnwindSafe for CallablePredicate<N>
impl<const N: usize> !Send for CallablePredicate<N>
impl<const N: usize> !Sync for CallablePredicate<N>
impl<const N: usize> Unpin for CallablePredicate<N>
impl<const N: usize> UnwindSafe for CallablePredicate<N>
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