rune::core::object::tagged

Trait IntoObject

Source
pub(crate) trait IntoObject {
    type Out<'ob>;

    // Required method
    fn into_obj<const C: bool>(self, block: &Block<C>) -> Gc<Self::Out<'_>>;
}
Expand description

Trait for types that can be managed by the GC. This trait is implemented for as many types as possible, even for types that are already Gc managed, Like Gc<T>. This makes it easier to write generic code for working with Gc types.

Required Associated Types§

Source

type Out<'ob>

Required Methods§

Source

fn into_obj<const C: bool>(self, block: &Block<C>) -> Gc<Self::Out<'_>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IntoObject for &str

Source§

type Out<'ob> = <String as IntoObject>::Out<'ob>

Source§

fn into_obj<const C: bool>(self, block: &Block<C>) -> Gc<Self::Out<'_>>

Source§

impl IntoObject for &[Gc<ObjectType<'_>>]

Source§

type Out<'ob> = &'ob LispVec

Source§

fn into_obj<const C: bool>(self, block: &Block<C>) -> Gc<Self::Out<'_>>

Source§

impl IntoObject for bool

Source§

type Out<'a> = Symbol<'a>

Source§

fn into_obj<const C: bool>(self, _: &Block<C>) -> Gc<Self::Out<'_>>

Source§

impl IntoObject for f64

Source§

type Out<'ob> = &'ob LispFloat

Source§

fn into_obj<const C: bool>(self, block: &Block<C>) -> Gc<Self::Out<'_>>

Source§

impl IntoObject for ()

Source§

type Out<'a> = Symbol<'a>

Source§

fn into_obj<const C: bool>(self, _: &Block<C>) -> Gc<Self::Out<'_>>

Source§

impl IntoObject for String

Source§

type Out<'ob> = &'ob LispString

Source§

fn into_obj<const C: bool>(self, block: &Block<C>) -> Gc<Self::Out<'_>>

Source§

impl IntoObject for Vec<u8>

Source§

type Out<'ob> = &'ob ByteString

Source§

fn into_obj<const C: bool>(self, block: &Block<C>) -> Gc<Self::Out<'_>>

Source§

impl IntoObject for Vec<Gc<ObjectType<'_>>>

Source§

type Out<'ob> = &'ob LispVec

Source§

fn into_obj<const C: bool>(self, block: &Block<C>) -> Gc<Self::Out<'_>>

Source§

impl IntoObject for IndexMap<Gc<ObjectType<'_>>, Gc<ObjectType<'_>>>

Source§

type Out<'ob> = &'ob LispHashTable

Source§

fn into_obj<const C: bool>(self, block: &Block<C>) -> Gc<Self::Out<'_>>

Source§

impl IntoObject for String<'_>

Source§

type Out<'ob> = <String as IntoObject>::Out<'ob>

Source§

fn into_obj<const C: bool>(self, block: &Block<C>) -> Gc<Self::Out<'_>>

Source§

impl IntoObject for Vec<'_, Gc<ObjectType<'_>>>

Source§

type Out<'ob> = &'ob LispVec

Source§

fn into_obj<const C: bool>(self, block: &Block<C>) -> Gc<Self::Out<'_>>

Source§

impl<T> IntoObject for Option<T>
where T: IntoObject,

Source§

type Out<'ob> = ObjectType<'ob>

Source§

fn into_obj<const C: bool>(self, block: &Block<C>) -> Gc<Self::Out<'_>>

Implementors§

Source§

impl IntoObject for &Rt<Slot<Gc<ObjectType<'_>>>>

Source§

type Out<'ob> = ObjectType<'ob>

Source§

impl IntoObject for &mut Rt<Slot<Gc<ObjectType<'_>>>>

Source§

type Out<'ob> = ObjectType<'ob>

Source§

impl IntoObject for NumberValue

Source§

type Out<'ob> = ObjectType<'ob>

Source§

impl IntoObject for Cons

Source§

type Out<'ob> = &'ob Cons

Source§

impl IntoObject for GcHeap<SymbolCellInner>

Source§

type Out<'ob> = Symbol<'ob>

Source§

impl IntoObject for Slot<Gc<ObjectType<'_>>>

Source§

type Out<'ob> = ObjectType<'ob>

Source§

impl IntoObject for ByteFnPrototype

Source§

type Out<'ob> = &'ob ByteFn

Source§

impl IntoObject for RecordBuilder<'_>

Source§

type Out<'ob> = &'ob Record

Source§

impl<T> IntoObject for Gc<T>

Source§

type Out<'ob> = ObjectType<'ob>

Source§

impl<T> IntoObject for T
where T: TagType,

Source§

type Out<'ob> = <T as TagType>::Out