pub struct StringPtr<'a> { /* private fields */ }
Expand description
§StringPtr
§C++ Info
- name:
hkStringPtr
- type_size:
4
(x86)/8
(x86_64) - align:
4
(x86)/8
(x86_64)
§Null representation
- hkx: It will not be written to the binary data.
- XML:
\u{2400}
. - Rust: If it is null then
Option::None
.(To eliminate the risk of always being null ptr by type)
§Deserialization patterns
- hkx(
Vec<u8>
) -> Struct(str
inCow<'_, str>
) => non copy - xml(
String
) -> Struct(str
inCow<'_, str>
) => non copy - json:
String
-> Struct(str
inCow<'_, str>
) => non copy
§Serialization is alloc
Implementations§
Source§impl<'a> StringPtr<'a>
impl<'a> StringPtr<'a>
Sourcepub fn into_inner(self) -> Option<Cow<'a, str>>
pub fn into_inner(self) -> Option<Cow<'a, str>>
Get inner value.
Sourcepub const fn is_null(&self) -> bool
pub const fn is_null(&self) -> bool
Null pointer or not?
This indicates that no binary data was present.
Sourcepub const fn should_write_binary(&self) -> bool
pub const fn should_write_binary(&self) -> bool
Should the data pointed to by the pointer be written to the binary data or not?
This is an invalid value or not.
Trait Implementations§
Source§impl<'a> Ord for StringPtr<'a>
impl<'a> Ord for StringPtr<'a>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialOrd for StringPtr<'a>
impl<'a> PartialOrd for StringPtr<'a>
impl<'a> Eq for StringPtr<'a>
impl<'a> StructuralPartialEq for StringPtr<'a>
Auto Trait Implementations§
impl<'a> Freeze for StringPtr<'a>
impl<'a> RefUnwindSafe for StringPtr<'a>
impl<'a> Send for StringPtr<'a>
impl<'a> Sync for StringPtr<'a>
impl<'a> Unpin for StringPtr<'a>
impl<'a> UnwindSafe for StringPtr<'a>
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