pub struct DateTime(/* private fields */);Expand description
The underlying data type returned by os.time()
Trait Implementations§
Source§impl KotoEntries for DateTime
impl KotoEntries for DateTime
Source§impl KotoObject for DateTime
impl KotoObject for DateTime
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>
fn index(&self, _index: &KValue) -> Result<KValue>
Called for indexing operations, e.g.
x[0] Read moreSource§fn index_mut(&mut self, _index: &KValue, _value: &KValue) -> Result<()>
fn index_mut(&mut self, _index: &KValue, _value: &KValue) -> Result<()>
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>
fn call(&mut self, _ctx: &mut CallContext<'_>) -> Result<KValue>
Allows the object to behave as a function Read more
Source§fn negate(&self, _vm: &mut KotoVm) -> Result<KValue>
fn negate(&self, _vm: &mut KotoVm) -> Result<KValue>
Defines the behavior of negation (e.g.
-x)Source§fn subtract_assign(&mut self, _rhs: &KValue) -> Result<()>
fn subtract_assign(&mut self, _rhs: &KValue) -> Result<()>
The
-= in-place subtraction operatorSource§fn multiply_assign(&mut self, _rhs: &KValue) -> Result<()>
fn multiply_assign(&mut self, _rhs: &KValue) -> Result<()>
The
*= in-place multiplication operatorSource§fn remainder_assign(&mut self, _rhs: &KValue) -> Result<()>
fn remainder_assign(&mut self, _rhs: &KValue) -> Result<()>
The
%= in-place remainder operatorSource§fn greater_or_equal(&self, _rhs: &KValue) -> Result<bool>
fn greater_or_equal(&self, _rhs: &KValue) -> Result<bool>
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>
fn make_iterator(&self, _vm: &mut KotoVm) -> Result<KIterator>
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 DateTime
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnwindSafe for DateTime
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.