#[repr(C)]pub enum TextPayload {
Owned(OwnedText),
Slice(SourceSlice),
}Expand description
The Text payload: either an owned UTF-8 string or a zero-copy slice into
another Text (the input buffer) (§4.3, §7.10, ADR-013).
Variants§
Owned(OwnedText)
An owned, heap-allocated UTF-8 string (string literals, runtime-built text) together with its lazily computed scalar count (ADR-115).
Slice(SourceSlice)
A zero-copy view into another Text’s bytes (§7.10). owner is traced
by the descriptor so the slice keeps its backing alive.
Implementations§
Source§impl TextPayload
impl TextPayload
Auto Trait Implementations§
impl !Freeze for TextPayload
impl !RefUnwindSafe for TextPayload
impl !Send for TextPayload
impl !Sync for TextPayload
impl !UnwindSafe for TextPayload
impl Unpin for TextPayload
impl UnsafeUnpin for TextPayload
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