pub enum ContextItem {
Command(CommandItem),
Environment(EnvironmentItem),
DelimiterControl(DelimiterControlItem),
}Expand description
A runtime-injectable definition that augments the knowledge base.
Context items let callers add temporary commands, environments, or delimiter controls without modifying the underlying package specs.
Variants§
Command(CommandItem)
A command definition (prefix, infix, or declarative)
Environment(EnvironmentItem)
An environment definition
DelimiterControl(DelimiterControlItem)
A delimiter control sequence (e.g. langle, rangle)
Implementations§
Source§impl ContextItem
impl ContextItem
Trait Implementations§
Source§impl Clone for ContextItem
impl Clone for ContextItem
Source§fn clone(&self) -> ContextItem
fn clone(&self) -> ContextItem
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 ContextItem
impl Debug for ContextItem
impl Eq for ContextItem
Source§impl From<CommandItem> for ContextItem
impl From<CommandItem> for ContextItem
Source§fn from(item: CommandItem) -> Self
fn from(item: CommandItem) -> Self
Converts to this type from the input type.
Source§impl From<DelimiterControlItem> for ContextItem
impl From<DelimiterControlItem> for ContextItem
Source§fn from(item: DelimiterControlItem) -> Self
fn from(item: DelimiterControlItem) -> Self
Converts to this type from the input type.
Source§impl From<EnvironmentItem> for ContextItem
impl From<EnvironmentItem> for ContextItem
Source§fn from(item: EnvironmentItem) -> Self
fn from(item: EnvironmentItem) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ContextItem
impl PartialEq for ContextItem
Source§fn eq(&self, other: &ContextItem) -> bool
fn eq(&self, other: &ContextItem) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContextItem
Auto Trait Implementations§
impl Freeze for ContextItem
impl RefUnwindSafe for ContextItem
impl Send for ContextItem
impl Sync for ContextItem
impl Unpin for ContextItem
impl UnsafeUnpin for ContextItem
impl UnwindSafe for ContextItem
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.