pub struct PrString { /* private fields */ }Implementations§
Source§impl PrStringSuite
impl PrStringSuite
Sourcepub fn new() -> Result<Self, Error>
pub fn new() -> Result<Self, Error>
Acquire this suite from the host. Returns error if the suite is not available. Suite is released on drop.
Sourcepub fn dispose_string(
&self,
sdk_string: *const PrSDKString,
) -> Result<(), Error>
pub fn dispose_string( &self, sdk_string: *const PrSDKString, ) -> Result<(), Error>
This will dispose of an SDKString. It is OK to pass in an empty string.
sdk_string- the string to dispose of
§Errors
Error::StringNotFound- this string has not been allocated, or may have already been disposedError::InvalidParms- one of the params is invalid
Sourcepub fn allocate_from_utf8(&self, string: &str) -> Result<PrSDKString, Error>
pub fn allocate_from_utf8(&self, string: &str) -> Result<PrSDKString, Error>
This will allocate an SDKString from a passed in null terminated string.
string- UTF8 string to copy into the SDK string
Returns the allocated PrSDKString which must be disposed using dispose_string()
§Errors
Error::StringNotFound- this string has not been allocated, or may have already been disposedError::InvalidParms- one of the params is invalid
Sourcepub fn copy_to_utf8_string(
&self,
sdk_string: *const PrSDKString,
) -> Result<String, Error>
pub fn copy_to_utf8_string( &self, sdk_string: *const PrSDKString, ) -> Result<String, Error>
This will copy an PrSDKString into a Rust’s String
§Errors
Error::InvalidParms- one of the params is invalid
Trait Implementations§
Source§impl Clone for PrStringSuite
impl Clone for PrStringSuite
Source§impl Debug for PrStringSuite
impl Debug for PrStringSuite
Source§impl Drop for PrStringSuite
impl Drop for PrStringSuite
Auto Trait Implementations§
impl Freeze for PrStringSuite
impl RefUnwindSafe for PrStringSuite
impl !Send for PrStringSuite
impl !Sync for PrStringSuite
impl Unpin for PrStringSuite
impl UnwindSafe for PrStringSuite
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more