rune::core::object

Module tagged

Source

Modules§

Macros§

Structs§

  • Gc πŸ”’
    This type has two meanings, it is both a value that is tagged as well as something that is managed by the GC. It is intended to be pointer sized, and have a lifetime tied to the context which manages garbage collections. A Gc can be reinterpreted as any type that shares the same tag.
  • RawObj πŸ”’

Enums§

  • FunctionType πŸ”’
    The enum form of Function to take advantage of ergonomics of enums in Rust.
  • ListType πŸ”’
    The enum form of List to take advantage of ergonomics of enums in Rust.
  • NumberType πŸ”’
    The enum form of Number to take advantage of ergonomics of enums in Rust.
  • ObjectType πŸ”’
    The enum form of Object to take advantage of ergonomics of enums in Rust.

Constants§

Traits§

  • CloneIn πŸ”’
  • GcPtr πŸ”’
  • IntoObject πŸ”’
    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.
  • TagType πŸ”’
    A wrapper trait to expose the tag method for GC managed references and immediate values. This is convenient when we don’t have access to the Context but want to retag a value. Doesn’t currently have a lot of use.
  • Untag πŸ”’
    The TaggedPtr trait is local to this module (by design). This trait exports the one pubic method we want (untag) so it can be used in other modules.
  • WithLifetime πŸ”’
    Helper trait to change the lifetime of a Gc mangaged type. This is useful because objects are initially tied to the lifetime of the Context they are allocated in. But when rooted the lifetime is dissociated from the Context. If we only worked with references, we could just use transmutes or casts to handle this, but generic types don’t expose their lifetimes. This trait is used to work around that. Must be used with extreme care, as it is easy to cast it to an invalid lifetime.

Functions§

Type Aliases§

  • Function πŸ”’
    Represents a tagged pointer to a lisp object that could be interpreted as a function. Note that not all Function types are valid functions (it could be a cons cell for example).
  • List πŸ”’
    Represents a tagged pointer to a list value (cons or nil)
  • Number πŸ”’
    Represents a tagged pointer to a number value
  • Object πŸ”’
    The Object defintion that contains all other possible lisp objects. This type must remain covariant over ’ob.
  • OptionalFlag πŸ”’