[−][src]Struct hdbconnect::types::CharLobSlice
Return value when reading a slice with CLob::read_slice()
or NCLob::read_slice()
.
Both methods allow specifying the offset
and the length
of the requested slice.
-
CLob::read_slice()
interpretsoffset
andlength
as numbers of bytes, applied to the HANA-internally used CESU8-encoding, where a unicode codepoint needs between 1 and 6 bytes.If the specified boundaries of the slice do not coincide with the begin or end of a unicode-codepoint, then it will begin and/or end with a byte sequence that cannot be converted into UTF-8, the unicode-encoding used by rust's
String
.CharLobSlice::prefix
and/orCharLobSlice::postfix
then contain these 1-5 extra bytes. -
NCLob::read_slice()
interpretsoffset
andlength
as numbers of unicode characters, where the following rule is applied:-
a unicode codepoint in BMP-0 (which is represented as 1, 2, or 3 bytes) counts as 1
-
a unicode codepoint in BMP-1 (which is represented as a pair of two surrogates, each of which is a 3-byte sequence) counts as 2.
If the specified boundaries of the slice do not coincide with the begin or end of a unicode-codepoint, i.e. if the slice begins with a second surrogate or ends with a first surrogate, then
CharLobSlice::prefix
and/orCharLobSlice::postfix
will contain these 3 extra bytes. -
Fields
prefix: Option<Vec<u8>>
If relevant, contains bytes at the begin of the slice from an incomplete unicode-codepoint.
data: String
The main part of the slice.
postfix: Option<Vec<u8>>
If relevant, contains bytes at the end of the slice from an incomplete unicode-codepoint.
Trait Implementations
impl Clone for CharLobSlice
[src]
pub fn clone(&self) -> CharLobSlice
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CharLobSlice
[src]
Auto Trait Implementations
impl RefUnwindSafe for CharLobSlice
[src]
impl Send for CharLobSlice
[src]
impl Sync for CharLobSlice
[src]
impl Unpin for CharLobSlice
[src]
impl UnwindSafe for CharLobSlice
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,