pub struct LongString {}Expand description
Arbitrary-length UTF-8 text stored as a blob.
Use for text that does not fit in the 32-byte ShortString
value boundary — documents, prompts, JSON payloads, logs, etc.
Reference it from tribles via a Handle<LongString>.
Trait Implementations§
Source§impl BlobEncoding for LongString
impl BlobEncoding for LongString
Source§fn blob_from<T: IntoBlob<Self>>(t: T) -> Blob<Self>
fn blob_from<T: IntoBlob<Self>>(t: T) -> Blob<Self>
Converts a concrete Rust type to a blob with this schema via
IntoBlob.Source§fn to_encoded(blob: Blob<Self>) -> Encoded<Handle<Self>>where
Handle<Self>: InlineEncoding,
fn to_encoded(blob: Blob<Self>) -> Encoded<Handle<Self>>where
Handle<Self>: InlineEncoding,
Lift a
Blob<Self> into the Encoded
sum entity!{} consumes — yields
Encoded::Blob(blob.transmute()). The handle lives inside the
blob; consumers recover it via
Encoded::inline. Read moreSource§impl Encodes<&'static str> for LongString
impl Encodes<&'static str> for LongString
Source§type Output = Blob<LongString>
type Output = Blob<LongString>
The concrete form this source produces when encoded for this
schema.
Inline<Self> for inline encodings, Blob<Self> for
blob encodings, or Inline<Handle<Self>> for the
precomputed-handle case where Self: BlobEncoding.Source§impl Encodes<String> for LongString
impl Encodes<String> for LongString
Source§type Output = Blob<LongString>
type Output = Blob<LongString>
The concrete form this source produces when encoded for this
schema.
Inline<Self> for inline encodings, Blob<Self> for
blob encodings, or Inline<Handle<Self>> for the
precomputed-handle case where Self: BlobEncoding.Source§impl Encodes<View<str>> for LongString
impl Encodes<View<str>> for LongString
Source§type Output = Blob<LongString>
type Output = Blob<LongString>
The concrete form this source produces when encoded for this
schema.
Inline<Self> for inline encodings, Blob<Self> for
blob encodings, or Inline<Handle<Self>> for the
precomputed-handle case where Self: BlobEncoding.Source§impl MetaDescribe for LongString
impl MetaDescribe for LongString
Source§fn id() -> Id
fn id() -> Id
Returns the id of this type. Default: derive from
Self::describe().root(). Impls choose whether the id is
explicit (an entity!{ &id_hex @ … } form inside describe)
or derived (no @, intrinsic id from the facts) — either
way the default reads the root the fragment carries. Read moreSource§impl TryFromBlob<LongString> for View<str>
impl TryFromBlob<LongString> for View<str>
Auto Trait Implementations§
impl Freeze for LongString
impl RefUnwindSafe for LongString
impl Send for LongString
impl Sync for LongString
impl Unpin for LongString
impl UnsafeUnpin for LongString
impl UnwindSafe for LongString
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
Source§impl<T> Encodes<&Inline<Handle<T>>> for T
impl<T> Encodes<&Inline<Handle<T>>> for T
Source§impl<S> Encodes<Blob<S>> for S
impl<S> Encodes<Blob<S>> for S
Source§impl<T> Encodes<Inline<Handle<T>>> for T
impl<T> Encodes<Inline<Handle<T>>> for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<S, T> IntoEncoded<S> for Twhere
S: Encodes<T>,
impl<S, T> IntoEncoded<S> for Twhere
S: Encodes<T>,
Source§fn into_encoded(self) -> <T as IntoEncoded<S>>::Output
fn into_encoded(self) -> <T as IntoEncoded<S>>::Output
Run the conversion.