Struct reaper_medium::ReaperStr
source · [−]pub struct ReaperStr(_);
Expand description
A borrowed string owned by REAPER.
reaper-rs functions pass this type to consumer-provided closures.
See ReaperString
for further details.
Implementations
sourceimpl ReaperStr
impl ReaperStr
sourcepub unsafe fn from_ptr<'a>(ptr: *const c_char) -> &'a ReaperStr
pub unsafe fn from_ptr<'a>(ptr: *const c_char) -> &'a ReaperStr
Wraps a raw C string with a safe Reaper string wrapper.
Safety
You must ensure that the given pointer refers to a valid UTF-8 encoded C string.
sourcepub fn to_reaper_string(&self) -> ReaperString
pub fn to_reaper_string(&self) -> ReaperString
Converts a ReaperStr
to an owned ReaperString
.
Trait Implementations
sourceimpl Borrow<ReaperStr> for ReaperString
impl Borrow<ReaperStr> for ReaperString
sourceimpl<'a> From<&'a ReaperStr> for ReaperStringArg<'a>
impl<'a> From<&'a ReaperStr> for ReaperStringArg<'a>
sourceimpl PartialOrd<ReaperStr> for ReaperStr
impl PartialOrd<ReaperStr> for ReaperStr
sourcefn partial_cmp(&self, other: &ReaperStr) -> Option<Ordering>
fn partial_cmp(&self, other: &ReaperStr) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl ToOwned for ReaperStr
impl ToOwned for ReaperStr
type Owned = ReaperString
type Owned = ReaperString
The resulting type after obtaining ownership.
sourcefn to_owned(&self) -> ReaperString
fn to_owned(&self) -> ReaperString
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · sourcefn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more