pub enum BytesDisplay {
Auto,
Ascii,
Utf16Le,
Raw,
}Expand description
How a Bytes blob should be rendered as a b"..." literal.
Auto is the default and lets decode_string pick
the encoding (or fall back to hex). The remaining variants are user-forced
overrides — e.g. from the GUI Strings pane — and are applied even when the
blob is not cleanly printable, escaping any bytes that don’t fit.
Variants§
Auto
Auto-detect ASCII / UTF-16LE, else hex.
Ascii
Force ASCII rendering.
Utf16Le
Force UTF-16LE rendering.
Raw
Force raw \xNN hex.
Trait Implementations§
Source§impl Clone for BytesDisplay
impl Clone for BytesDisplay
Source§fn clone(&self) -> BytesDisplay
fn clone(&self) -> BytesDisplay
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BytesDisplay
Source§impl Debug for BytesDisplay
impl Debug for BytesDisplay
Source§impl Default for BytesDisplay
impl Default for BytesDisplay
Source§fn default() -> BytesDisplay
fn default() -> BytesDisplay
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BytesDisplay
impl<'de> Deserialize<'de> for BytesDisplay
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for BytesDisplay
Source§impl Hash for BytesDisplay
impl Hash for BytesDisplay
Source§impl PartialEq for BytesDisplay
impl PartialEq for BytesDisplay
Source§impl Serialize for BytesDisplay
impl Serialize for BytesDisplay
impl StructuralPartialEq for BytesDisplay
Auto Trait Implementations§
impl Freeze for BytesDisplay
impl RefUnwindSafe for BytesDisplay
impl Send for BytesDisplay
impl Sync for BytesDisplay
impl Unpin for BytesDisplay
impl UnsafeUnpin for BytesDisplay
impl UnwindSafe for BytesDisplay
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