pub enum MetaKey {
BinaryOp(BinaryOp),
UnaryOp(UnaryOp),
Call,
IndexMut,
Named(KString),
Test(KString),
PreTest,
PostTest,
Main,
Type,
Base,
}Expand description
The key type used by MetaMaps
Variants§
BinaryOp(BinaryOp)
A binary operation
e.g. @+, @==
UnaryOp(UnaryOp)
A unary operation
e.g. @not
Call
Function call - @call
Defines the behaviour when performing a function call on the object.
IndexMut
@index_mut
Defines how an object should behave in mutable indexing operations.
Named(KString)
A named key
e.g. @meta my_named_key
Named entries are used in KMaps, so that shared named items can be
made available without them being inserted into the map’s contents.
Test(KString)
A test function
e.g. @test my_test
PreTest
@pre_test
Used to define a function that will be run before each @test.
PostTest
@post_test
Used to define a function that will be run after each @test.
Main
@main
Used to define a function that will be run when a module is first imported.
Type
@type
Provides a KString that declares the value’s type.
Base
@base
Defines a base map to be used as fallback for accesses when a key isn’t found.
Trait Implementations§
impl Eq for MetaKey
Source§impl Equivalent<MetaKey> for str
Support efficient map accesses with &str
impl Equivalent<MetaKey> for str
Support efficient map accesses with &str
Source§fn equivalent(&self, other: &MetaKey) -> bool
fn equivalent(&self, other: &MetaKey) -> bool
key and return true if they are equal.Source§impl Equivalent<MetaKey> for KString
impl Equivalent<MetaKey> for KString
Source§fn equivalent(&self, other: &MetaKey) -> bool
fn equivalent(&self, other: &MetaKey) -> bool
key and return true if they are equal.impl StructuralPartialEq for MetaKey
Auto Trait Implementations§
impl !Send for MetaKey
impl !Sync for MetaKey
impl Freeze for MetaKey
impl RefUnwindSafe for MetaKey
impl Unpin for MetaKey
impl UnsafeUnpin for MetaKey
impl UnwindSafe for MetaKey
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
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§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
key and return true if they are equal.