pub enum Framing {
Text,
Json,
Jsonl,
}Expand description
The wire format of what a command writes to stdout.
This is the machine contract, distinct from the name a user types for it. It is what
decides a consumer’s shape: Framing::Json is read to EOF and parsed once, so a
generated client returns a value; Framing::Jsonl arrives a line at a time and may
never end, so a generated client has to return an iterator and must not buffer.
Variants§
Text
Human-readable text. Nothing may be assumed about its structure, and it is the default because an output that says nothing about its framing is prose.
Json
One JSON document, read to end of stream.
Jsonl
One JSON document per line. Line-delimited, unbounded, and read incrementally —
ndjson is the same thing under another name.
Implementations§
Trait Implementations§
impl Copy for Framing
impl Eq for Framing
Source§impl Ord for Framing
impl Ord for Framing
1.21.0 (const: unstable) · 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 PartialOrd for Framing
impl PartialOrd for Framing
impl StructuralPartialEq for Framing
Auto Trait Implementations§
impl Freeze for Framing
impl RefUnwindSafe for Framing
impl Send for Framing
impl Sync for Framing
impl Unpin for Framing
impl UnsafeUnpin for Framing
impl UnwindSafe for Framing
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 more