pub enum Rendered {
Null,
Text(String),
Opaque {
bytes: usize,
encoding: String,
},
Encrypted {
bytes: usize,
encoding: String,
},
}Expand description
What a payload can be shown as.
Variants§
Null
Nothing was sent. Distinct from an empty string, which is a value.
Text(String)
Text, ready to display. JSON is pretty-printed.
Opaque
Bytes we will not try to render. Guessing at an encoding produces mojibake, and a terminal is an unforgiving place to paste control characters into.
Encrypted
Not readable without the user’s codec server. Renders as a badge until a decode
resolves, the value is not lost, it is just not readable yet. The encoding is carried
so the badge can name it: a codec names its output itself, and binary/aes_comp is
as legitimate as binary/encrypted.
Trait Implementations§
impl Eq for Rendered
impl StructuralPartialEq for Rendered
Auto Trait Implementations§
impl Freeze for Rendered
impl RefUnwindSafe for Rendered
impl Send for Rendered
impl Sync for Rendered
impl Unpin for Rendered
impl UnsafeUnpin for Rendered
impl UnwindSafe for Rendered
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