pub struct Match { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl KotoEntries for Match
impl KotoEntries for Match
Source§impl KotoObject for Match
impl KotoObject for Match
Source§fn display(&self, ctx: &mut DisplayContext<'_>) -> Result<()>
fn display(&self, ctx: &mut DisplayContext<'_>) -> Result<()>
Called when the object should be displayed as a string, e.g. by
io.print
Read moreSource§fn index(&self, _index: &KValue) -> Result<KValue, Error>
fn index(&self, _index: &KValue) -> Result<KValue, Error>
Called for indexing operations, e.g.
x[0]
Read moreSource§fn index_mut(&mut self, _index: &KValue, _value: &KValue) -> Result<(), Error>
fn index_mut(&mut self, _index: &KValue, _value: &KValue) -> Result<(), Error>
Called when mutating an object via indexing, e.g.
x[0] = 99
Read moreSource§fn size(&self) -> Option<usize>
fn size(&self) -> Option<usize>
Called when checking for the number of elements contained in the object Read more
Source§fn is_callable(&self) -> bool
fn is_callable(&self) -> bool
Declares to the runtime whether or not the object is callable Read more
Source§fn call(&mut self, _ctx: &mut CallContext<'_>) -> Result<KValue, Error>
fn call(&mut self, _ctx: &mut CallContext<'_>) -> Result<KValue, Error>
Allows the object to behave as a function Read more
Source§fn negate(&self, _vm: &mut KotoVm) -> Result<KValue, Error>
fn negate(&self, _vm: &mut KotoVm) -> Result<KValue, Error>
Defines the behavior of negation (e.g.
-x
)Source§fn add_assign(&mut self, _rhs: &KValue) -> Result<(), Error>
fn add_assign(&mut self, _rhs: &KValue) -> Result<(), Error>
The
+=
in-place addition operatorSource§fn subtract_assign(&mut self, _rhs: &KValue) -> Result<(), Error>
fn subtract_assign(&mut self, _rhs: &KValue) -> Result<(), Error>
The
-=
in-place subtraction operatorSource§fn multiply_assign(&mut self, _rhs: &KValue) -> Result<(), Error>
fn multiply_assign(&mut self, _rhs: &KValue) -> Result<(), Error>
The
*=
in-place multiplication operatorSource§fn divide_assign(&mut self, _rhs: &KValue) -> Result<(), Error>
fn divide_assign(&mut self, _rhs: &KValue) -> Result<(), Error>
The
/=
in-place division operatorSource§fn remainder_assign(&mut self, _rhs: &KValue) -> Result<(), Error>
fn remainder_assign(&mut self, _rhs: &KValue) -> Result<(), Error>
The
%=
in-place remainder operatorSource§fn less_or_equal(&self, _rhs: &KValue) -> Result<bool, Error>
fn less_or_equal(&self, _rhs: &KValue) -> Result<bool, Error>
The
<=
less-than-or-equal operatorSource§fn greater_or_equal(&self, _rhs: &KValue) -> Result<bool, Error>
fn greater_or_equal(&self, _rhs: &KValue) -> Result<bool, Error>
The
>=
greater-than-or-equal operatorSource§fn is_iterable(&self) -> IsIterable
fn is_iterable(&self) -> IsIterable
Declares to the runtime whether or not the object is iterable Read more
Source§fn make_iterator(&self, _vm: &mut KotoVm) -> Result<KIterator, Error>
fn make_iterator(&self, _vm: &mut KotoVm) -> Result<KIterator, Error>
Returns an iterator that iterates over the objects contents Read more
Source§fn iterator_next(&mut self, _vm: &mut KotoVm) -> Option<KIteratorOutput>
fn iterator_next(&mut self, _vm: &mut KotoVm) -> Option<KIteratorOutput>
Gets the object’s next value in an iteration Read more
Source§fn iterator_next_back(&mut self, _vm: &mut KotoVm) -> Option<KIteratorOutput>
fn iterator_next_back(&mut self, _vm: &mut KotoVm) -> Option<KIteratorOutput>
Gets the object’s next value from the end of an iteration Read more
Auto Trait Implementations§
impl Freeze for Match
impl RefUnwindSafe for Match
impl !Send for Match
impl !Sync for Match
impl Unpin for Match
impl UnwindSafe for Match
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.