Struct Match

Source
pub struct Match { /* private fields */ }

Implementations§

Source§

impl Match

Source

pub fn make_value(matched: KString, start: usize, end: usize) -> KValue

Trait Implementations§

Source§

impl Clone for Match

Source§

fn clone(&self) -> Match

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Match

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Match> for KValue

Source§

fn from(match_: Match) -> Self

Converts to this type from the input type.
Source§

impl KotoCopy for Match

Source§

fn copy(&self) -> KObject

How the object should behave when called from koto.copy Read more
Source§

fn deep_copy(&self) -> KObject

How the object should behave when called from koto.deep_copy Read more
Source§

impl KotoEntries for Match

Source§

fn entries(&self) -> Option<KMap>

Returns an optional KMap containing entries that can be accessed via the ‘.’ operator. Read more
Source§

impl KotoObject for Match

Source§

fn display(&self, ctx: &mut DisplayContext<'_>) -> Result<()>

Called when the object should be displayed as a string, e.g. by io.print Read more
Source§

fn index(&self, _index: &KValue) -> Result<KValue, Error>

Called for indexing operations, e.g. x[0] Read more
Source§

fn index_mut(&mut self, _index: &KValue, _value: &KValue) -> Result<(), Error>

Called when mutating an object via indexing, e.g. x[0] = 99 Read more
Source§

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

Declares to the runtime whether or not the object is callable Read more
Source§

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>

Defines the behavior of negation (e.g. -x)
Source§

fn add(&self, _rhs: &KValue) -> Result<KValue, Error>

The + addition operator ()
Source§

fn subtract(&self, _rhs: &KValue) -> Result<KValue, Error>

The - subtraction operator
Source§

fn multiply(&self, _rhs: &KValue) -> Result<KValue, Error>

The * multiplication operator
Source§

fn divide(&self, _rhs: &KValue) -> Result<KValue, Error>

The / division operator
Source§

fn remainder(&self, _rhs: &KValue) -> Result<KValue, Error>

The % remainder operator
Source§

fn add_assign(&mut self, _rhs: &KValue) -> Result<(), Error>

The += in-place addition operator
Source§

fn subtract_assign(&mut self, _rhs: &KValue) -> Result<(), Error>

The -= in-place subtraction operator
Source§

fn multiply_assign(&mut self, _rhs: &KValue) -> Result<(), Error>

The *= in-place multiplication operator
Source§

fn divide_assign(&mut self, _rhs: &KValue) -> Result<(), Error>

The /= in-place division operator
Source§

fn remainder_assign(&mut self, _rhs: &KValue) -> Result<(), Error>

The %= in-place remainder operator
Source§

fn less(&self, _rhs: &KValue) -> Result<bool, Error>

The < less-than operator
Source§

fn less_or_equal(&self, _rhs: &KValue) -> Result<bool, Error>

The <= less-than-or-equal operator
Source§

fn greater(&self, _rhs: &KValue) -> Result<bool, Error>

The > greater-than operator
Source§

fn greater_or_equal(&self, _rhs: &KValue) -> Result<bool, Error>

The >= greater-than-or-equal operator
Source§

fn equal(&self, _rhs: &KValue) -> Result<bool, Error>

The == equality operator
Source§

fn not_equal(&self, _rhs: &KValue) -> Result<bool, Error>

The != inequality operator
Source§

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>

Returns an iterator that iterates over the objects contents Read more
Source§

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>

Gets the object’s next value from the end of an iteration Read more
Source§

impl KotoType for Match

Source§

fn type_static() -> &'static str

The Object’s type as a static string
Source§

fn type_string(&self) -> KString

The type of the Object as a KString 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

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>

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)

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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> KotoField for T
where T: Clone + KotoSend + KotoSync + 'static,

Source§

impl<T> KotoSend for T

Source§

impl<T> KotoSync for T