Struct janetrs::JanetAbstract [−][src]
#[repr(transparent)]pub struct JanetAbstract { /* fields omitted */ }
Expand description
Type that represents the Janet Abstract type.
Janet Abstract types is the way to expose non-native types to the Janet Runtime and allow the Janet user to interact with them.
It works like a *mut c_void
pointer, but the memory it uses are tracked by the Janet
Garbage Collector.
Implementations
Creates a JanetAbstract
using information from the type that can be used as
JanetAbstract
Returns a reference to the abstract type data as A
Safety
This function doesn’t check if the underlying data of the JanetAbstract
object
and the requested type A
are the same.
Returns a mutable reference to the abstract type data as A
Safety
This function doesn’t check if the underlying data of the JanetAbstract
object
and the requested type A
are the same.
Check if the JanetAbstract
data is of the type A
.
Returns a reference to value if it’s the same kind of abstract.
Error
This function may return AbstractError::MismatchedSize
if this object size is
different of requested type A
size, or AbstractError::MismatchedAbstractType
if any of the function pointer in the JanetAbstractType
are different.
Returns a exclusive reference to value if it’s the same kind of abstract.
Error
This function may return AbstractError::MismatchedSize
if this object size is
different of requested type A
size, or AbstractError::MismatchedAbstractType
if any of the function pointer in the JanetAbstractType
are different.
Acquires the underlying pointer.
Casts to a pointer of another type.
Return the struct that holds the type name and all possible polimorfic function pointer that a Abstract type can have in Janet.
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl !RefUnwindSafe for JanetAbstract
impl !Send for JanetAbstract
impl !Sync for JanetAbstract
impl Unpin for JanetAbstract
impl UnwindSafe for JanetAbstract