Trait janetrs::IsJanetAbstract

source ·
pub trait IsJanetAbstract {
    type Get: IsJanetAbstract;

    const SIZE: usize;

    // Required method
    fn type_info() -> &'static JanetAbstractType;
}
Expand description

The trait that encodes the information required to instantiate the implementer as JanetAbstract

Required Associated Types§

source

type Get: IsJanetAbstract

The type that you get when you call JanetAbstract::get family of functions.

This is usually set to Self when the type does not implement Drop, or ManuallyDrop<Self> if the type implements Drop.

Required Associated Constants§

source

const SIZE: usize

The size of the type that is being transformed as JanetAbstract.

Usually mem::size_of<Self>()

Required Methods§

source

fn type_info() -> &'static JanetAbstractType

Returns the table of the name of the Self and all possible polymorphic function pointer that a Abstract type can have in Janet.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IsJanetAbstract for i64

§

type Get = i64

source§

const SIZE: usize = 8usize

source§

fn type_info() -> &'static JanetAbstractType

source§

impl IsJanetAbstract for u64

§

type Get = u64

source§

const SIZE: usize = 8usize

source§

fn type_info() -> &'static JanetAbstractType

source§

impl<A> IsJanetAbstract for ManuallyDrop<A>
where A: IsJanetAbstract,

Implementors§