PrSDKStringSuite

Struct PrSDKStringSuite 

Source
#[repr(C, packed(1))]
pub struct PrSDKStringSuite { pub DisposeString: Option<unsafe extern "C" fn(inSDKString: *const PrSDKString) -> prSuiteError>, pub AllocateFromUTF8: Option<unsafe extern "C" fn(inUTF8String: *const prUTF8Char, outSDKString: *mut PrSDKString) -> prSuiteError>, pub CopyToUTF8String: Option<unsafe extern "C" fn(inSDKString: *const PrSDKString, outUTF8StringBuffer: *mut prUTF8Char, ioUTF8StringBufferSizeInElements: *mut csSDK_uint32) -> prSuiteError>, pub AllocateFromUTF16: Option<unsafe extern "C" fn(inUTF16String: *const prUTF16Char, outSDKString: *mut PrSDKString) -> prSuiteError>, pub CopyToUTF16String: Option<unsafe extern "C" fn(inSDKString: *const PrSDKString, outUTF16StringBuffer: *mut prUTF16Char, ioUTF16StringBufferSizeInElements: *mut csSDK_uint32) -> prSuiteError>, }

Fields§

§DisposeString: Option<unsafe extern "C" fn(inSDKString: *const PrSDKString) -> prSuiteError>

This will dispose of an SDKString. It is OK to pass in an empty string.

@param inSDKString the string to dispose of

@return suiteError_StringNotFound this string has not been allocated, or may have already been disposed @return suiteError_InvalidParms one of the params is invalid

§AllocateFromUTF8: Option<unsafe extern "C" fn(inUTF8String: *const prUTF8Char, outSDKString: *mut PrSDKString) -> prSuiteError>

This will allocate an SDKString from a passed in null terminated string.

@param inUTF8String null terminated UTF8 string to copy into the SDK string @param ioSDKString this passed in SDK string will receive the new allocated string - you must dispose of this sdk string

@return suiteError_StringNotFound this string has not been allocated, or may have already been disposed @return suiteError_InvalidParms one of the params is invalid

§CopyToUTF8String: Option<unsafe extern "C" fn(inSDKString: *const PrSDKString, outUTF8StringBuffer: *mut prUTF8Char, ioUTF8StringBufferSizeInElements: *mut csSDK_uint32) -> prSuiteError>

This will copy an SDKString into a UTF8 null terminated string if ioUTF8StringBufferByteCount reports enough bytes in the string buffer to copy. If there are not enough bytes - suiteError_StringBufferTooSmall will be returned and ioUTF8StringBufferByteCount will contain the number of bytes needed to hold the string.

@param outUTF8StringBuffer Buffer where UTF8 string will be stored @param ioUTF8StringBufferSizeInElements Pass in the size, in elements, of outUTF8StringStorage. Returns the number of elements copied. Includes terminating 0.

@return suiteError_InvalidParms One of the params is invalid @return suiteError_StringBufferTooSmall The passed in string buffer is too small. ioUTF8StringBufferByteCount will contain the number of bytes needed to copy this string. @return suiteError_NoError The string has been copied. ioUTF8StringBufferByteCount contains the number of bytes copied.

§AllocateFromUTF16: Option<unsafe extern "C" fn(inUTF16String: *const prUTF16Char, outSDKString: *mut PrSDKString) -> prSuiteError>

This will allocate an SDKString from a passed in null terminated string.

@param inUTF16String null terminated UTF16 string to copy into the SDK string @param ioSDKString this passed in SDK string will receive the new allocated string - you must dispose of this sdk string

@return suiteError_StringNotFound this string has not been allocated, or may have already been disposed @return suiteError_InvalidParms one of the params is invalid

§CopyToUTF16String: Option<unsafe extern "C" fn(inSDKString: *const PrSDKString, outUTF16StringBuffer: *mut prUTF16Char, ioUTF16StringBufferSizeInElements: *mut csSDK_uint32) -> prSuiteError>

This will copy an SDKString into a UTF16 null terminated string if ioUTF16StringBufferByteCount reports enough bytes in the string buffer to copy. If there are not enough bytes - suiteError_StringBufferTooSmall will be returned and ioUTF16StringBufferByteCount will contain the number of bytes needed to hold the string.

@param outUTF16StringBuffer Buffer where UTF16 string will be stored @param ioUTF16StringBufferSizeInElements Pass in the size, in elements, of outUTF16StringStorage. Returns the number of elements copied. Includes terminating 0.

@return suiteError_InvalidParms One of the params is invalid @return suiteError_StringBufferTooSmall The passed in string buffer is too small. ioUTF16StringBufferByteCount will contain the number of bytes needed to copy this string. @return suiteError_NoError The string has been copied. ioUTF16StringBufferByteCount contains the number of bytes copied.

Trait Implementations§

Source§

impl Clone for PrSDKStringSuite

Source§

fn clone(&self) -> PrSDKStringSuite

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PrSDKStringSuite

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for PrSDKStringSuite

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.