pub struct ContextMixins { /* private fields */ }Implementations§
Source§impl ContextMixins
impl ContextMixins
pub fn new(allowed_mixins: &[PromptContextMixin]) -> Self
Trait Implementations§
Source§impl Clone for ContextMixins
impl Clone for ContextMixins
Source§fn clone(&self) -> ContextMixins
fn clone(&self) -> ContextMixins
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§impl Debug for ContextMixins
impl Debug for ContextMixins
Source§impl Default for ContextMixins
impl Default for ContextMixins
Source§fn default() -> ContextMixins
fn default() -> ContextMixins
Returns the “default value” for a type. Read more
Source§impl Object for ContextMixins
impl Object for ContextMixins
Source§fn get_value(self: &Arc<Self>, field: &Value) -> Option<Value>
fn get_value(self: &Arc<Self>, field: &Value) -> Option<Value>
Given a key, looks up the associated value.
Source§fn repr(self: &Arc<Self>) -> ObjectRepr
fn repr(self: &Arc<Self>) -> ObjectRepr
Indicates the natural representation of an object. Read more
Source§fn get_value_by_str(self: &Arc<Self>, key: &str) -> Option<Value>
fn get_value_by_str(self: &Arc<Self>, key: &str) -> Option<Value>
Given a string key, looks up the associated value. Read more
Source§fn enumerator_len(self: &Arc<Self>) -> Option<usize>
fn enumerator_len(self: &Arc<Self>) -> Option<usize>
Returns the length of the enumerator. Read more
Source§fn is_true(self: &Arc<Self>) -> bool
fn is_true(self: &Arc<Self>) -> bool
Returns
true if this object is considered true for if conditions. Read moreSource§fn call(
self: &Arc<Self>,
state: &State<'_, '_>,
args: &[Value],
) -> Result<Value, Error>
fn call( self: &Arc<Self>, state: &State<'_, '_>, args: &[Value], ) -> Result<Value, Error>
The engine calls this to invoke the object itself. Read more
Source§fn call_method(
self: &Arc<Self>,
state: &State<'_, '_>,
method: &str,
args: &[Value],
) -> Result<Value, Error>
fn call_method( self: &Arc<Self>, state: &State<'_, '_>, method: &str, args: &[Value], ) -> Result<Value, Error>
The engine calls this to invoke a method on the object. Read more
Auto Trait Implementations§
impl Freeze for ContextMixins
impl RefUnwindSafe for ContextMixins
impl Send for ContextMixins
impl Sync for ContextMixins
impl Unpin for ContextMixins
impl UnsafeUnpin for ContextMixins
impl UnwindSafe for ContextMixins
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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> ObjectExt for T
impl<T> ObjectExt for T
Source§fn mapped_enumerator<F>(self: &Arc<Self>, maker: F) -> Enumerator
fn mapped_enumerator<F>(self: &Arc<Self>, maker: F) -> Enumerator
Creates a new iterator enumeration that projects into the given object. Read more
Source§fn mapped_rev_enumerator<F>(self: &Arc<Self>, maker: F) -> Enumerator
fn mapped_rev_enumerator<F>(self: &Arc<Self>, maker: F) -> Enumerator
Creates a new reversible iterator enumeration that projects into the given object. Read more