MeshLib Rust Docs
Loading...
Searching...
No Matches
Inheritance diagram for meshlib::std_string:

Public Member Functions

void assign_from_another (other:&meshlib::std_string)
void assign_from (other:&str)
auto size () const -> usize
auto data () const -> *const core::ffi::c_char
auto data_mut () -> *const core::ffi::c_char
auto data_end () const -> *const core::ffi::c_char
auto data_end_mut () -> *mut core::ffi::c_char
auto as_bytes () const -> &[u8]
auto to_str () const -> Result<&str, core::str::Utf8Error >

Static Public Member Functions

static auto new () -> meshlib::Owned< meshlib::std_string >
static auto construct_from_another (other:&meshlib::std_string) -> meshlib::Owned< meshlib::std_string >
static auto construct_from (other:&str) -> meshlib::Owned< meshlib::std_string >
Static Public Member Functions inherited from meshlib::CppClass
static void destroy (ptr:*mut Self)
Static Public Member Functions inherited from meshlib::CppCopy
static auto copy (ptr:*const Self) -> *mut Self

Detailed Description

A heap-allocated null-terminated string.

Generated from class std::string. Heap-allocated instances are held in Owned<std_string>.

Member Function Documentation

◆ as_bytes()

auto meshlib::std_string::as_bytes ( ) const -> &[u8]

◆ assign_from()

void meshlib::std_string::assign_from ( other:& str)

Assigns the contents.

Calls MR_std_string_AssignFrom().

◆ assign_from_another()

void meshlib::std_string::assign_from_another ( other:&meshlib::std_string )

Assigns the contents from another instance. Both objects remain alive after the call.

Calls MR_std_string_AssignFromAnother(). The reference to the parameter other might be preserved in this object.

◆ construct_from()

auto meshlib::std_string::construct_from ( other:& str) -> meshlib::Owned< meshlib::std_string >
static

Constructs a new instance.

Calls MR_std_string_ConstructFrom().

◆ construct_from_another()

auto meshlib::std_string::construct_from_another ( other:&meshlib::std_string ) -> meshlib::Owned< meshlib::std_string >
static

Constructs a copy of another instance. The source remains alive.

Calls MR_std_string_ConstructFromAnother(). The reference to the parameter other might be preserved in the constructed object.

◆ data()

auto meshlib::std_string::data ( ) const -> *const core::ffi::c_char

Returns the string contents, which are always null-terminated.

Calls MR_std_string_data(). Some types are raw C types, see the C bindings for the details. The reference to this object might be preserved as the return value.

◆ data_end()

auto meshlib::std_string::data_end ( ) const -> *const core::ffi::c_char

Returns a pointer to the end of string, to its null-terminator.

Calls MR_std_string_data_end(). Some types are raw C types, see the C bindings for the details. The reference to this object might be preserved as the return value.

◆ data_end_mut()

auto meshlib::std_string::data_end_mut ( ) -> *mut core::ffi::c_char

Returns a pointer to the end of string, to its null-terminator. This version returns a non-const pointer.

Calls MR_std_string_data_end_mut(). Some types are raw C types, see the C bindings for the details. The reference to this object might be preserved as the return value.

◆ data_mut()

auto meshlib::std_string::data_mut ( ) -> *const core::ffi::c_char

Returns the string contents, which are always null-terminated. This version returns a non-const pointer.

Calls MR_std_string_data_mut(). Some types are raw C types, see the C bindings for the details. The reference to this object might be preserved as the return value.

◆ new()

auto meshlib::std_string::new ( ) -> meshlib::Owned< meshlib::std_string >
static

Constructs an empty (default-constructed) instance.

Calls MR_std_string_DefaultConstruct().

◆ size()

auto meshlib::std_string::size ( ) const -> usize

The number of characters in the string, excluding the null-terminator.

Calls MR_std_string_size().

◆ to_str()

auto meshlib::std_string::to_str ( ) const -> Result<&str, core::str::Utf8Error >

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