RustObject

open class RustObject : Destroyable

Base class that wraps an non-optional OpaquePointer representing a pointer to a Rust object. This class provides cleanup functions on deinit, ensuring that all classes that inherit from it will have their OpaquePointer destroyed when the Swift wrapper is destroyed. If a class does not override cleanup then a fatalError is thrown.

  • Undocumented

    Declaration

    Swift

    public init(raw: OpaquePointer)
  • Undocumented

    Declaration

    Swift

    public init(raw: UnsafeMutableRawPointer)
  • Undocumented

    Declaration

    Swift

    public init?(raw: OpaquePointer?)
  • Undocumented

    Declaration

    Swift

    public func getRaw() -> OpaquePointer
  • Undocumented

    Declaration

    Swift

    open func cleanup(pointer: OpaquePointer)