rune::core::object

Module cell

Source

Structsยง

  • MutObjCell ๐Ÿ”’
    This represents a mutable view into an Object. See ObjCell for a more detailed explanation. Holding this type means that we confirmed that the data stucture is mutable, and we can use the MutObjCell::set method update this cell.
  • ObjCell ๐Ÿ”’
    This type represents and immutable view into an Object. The reason we have an additional type is because there could be other references to this same cell that can change the underlying data, so this is wrapper around std::cell::Cell type. It is not valid to mutate the data under a reference unless it is inside an Unsafe Cell. However because this struct could also be used in an immutable data structure (function constants), we need to ensure that this cell cannot be mutated by default. This type is not safe to be copy or clone.