MeshLib Rust Docs
Loading...
Searching...
No Matches
meshlib::Owned< T > Struct Template Reference
Inheritance diagram for meshlib::Owned< T >:

Public Member Functions

auto into_raw () -> *mut T
 Releases ownership. The caller must destroy the object.
auto as_ptr () const -> *const T
auto as_mut_ptr () -> *mut T

Static Public Member Functions

static auto from_raw (ptr:*mut T) -> Self

Detailed Description

template<typename T>
struct meshlib::Owned< T >

An owning handle to a heap-allocated C++ object. Destroys the object when dropped. Dereferences to the class itself, which holds all the methods.

T: CppClass

Member Function Documentation

◆ as_mut_ptr()

template<typename T>
auto meshlib::Owned< T >::as_mut_ptr ( ) -> *mut T

◆ as_ptr()

template<typename T>
auto meshlib::Owned< T >::as_ptr ( ) const -> *const T

◆ from_raw()

template<typename T>
auto meshlib::Owned< T >::from_raw ( ptr:*mut T) -> Self
static

Takes ownership of a pointer returned by the C bindings. The pointer must not be null.

Note
This function is unsafe.

◆ into_raw()

template<typename T>
auto meshlib::Owned< T >::into_raw ( ) -> *mut T

Releases ownership. The caller must destroy the object.


The documentation for this struct was generated from the following file: