Struct mica::RawSelf

source ·
#[repr(transparent)]
pub struct RawSelf<'a>(_);
Expand description

Wrapper struct for marking functions that use the with-raw-self calling convention.

This Derefs to the inner value.

Methods from Deref<Target = RawValue>§

Hashes the value. Note that this is not part of a std::hash::Hash implementation because this may get extra arguments in the future to support overloading hashing from the language itself.

Returns the kind of value stored.

Returns a boolean value without performing any checks.

Safety

Calling this on a value that isn’t known to be a boolean is undefined behavior.

Returns a number value without performing any checks.

Safety

Calling this on a value that isn’t known to be a number is undefined behavior.

Returns a string value without performing any checks.

Safety

Calling this on a value that isn’t known to be a string is undefined behavior.

Returns a function value without performing any checks.

Safety

Calling this on a value that isn’t known to be a function is undefined behavior.

Returns a struct value without performing any checks.

Safety

Calling this on a value that isn’t known to be a struct is undefined behavior.

Returns a trait value without performing any checks.

Safety

Calling this on a value that isn’t known to be a trait is undefined behavior.

Returns a list value without performing any checks.

Safety

Calling this on a value that isn’t known to be a list is undefined behavior.

Returns a dict value without performing any checks.

Safety

Calling this on a value that isn’t known to be a dict is undefined behavior.

Returns a user data value without performing any checks.

Safety

Calling this on a value that isn’t known to be a user data is undefined behavior.

Ensures the value is a Nil, returning a type mismatch error if that’s not the case.

Ensures the value is a Boolean, returning a type mismatch error if that’s not the case.

Ensures the value is a Number, returning a type mismatch error if that’s not the case.

Ensures the value is a String, returning a type mismatch error if that’s not the case.

Ensures the value is a Function, returning a type mismatch error if that’s not the case.

Ensures the value is a Struct, returning a type mismatch error if that’s not the case.

Ensures the value is a Trait, returning a type mismatch error if that’s not the case.

Ensures the value is a UserData of the given type T, returning a type mismatch error that’s not the case.

Returns whether the value is truthy. All values except Nil and False are truthy.

Returns whether the values is falsy. The only falsy values are Nil and False.

Attempts to partially compare this value with another one.

Returns an error if the types of the two values are not the same.

Trait Implementations§

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.