pub enum DisplayHint {
None,
Binary,
Hex,
Octal,
}
Expand description
A display hint (for tooling only)
Variants§
None
No display hint
Binary
Use a binary representation
Hex
Use a hexadecimal representation
Octal
Use a octal representation
Implementations§
Source§impl DisplayHint
impl DisplayHint
Sourcepub fn format_value(self, value: &Value) -> String
pub fn format_value(self, value: &Value) -> String
Converts a Value to String applying the correct display hint.
Trait Implementations§
Source§impl Clone for DisplayHint
impl Clone for DisplayHint
Source§fn clone(&self) -> DisplayHint
fn clone(&self) -> DisplayHint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DisplayHint
impl Debug for DisplayHint
Source§impl<'de> Deserialize<'de> for DisplayHint
impl<'de> Deserialize<'de> for DisplayHint
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
Source§impl PartialEq for DisplayHint
impl PartialEq for DisplayHint
Source§impl Serialize for DisplayHint
impl Serialize for DisplayHint
impl Copy for DisplayHint
impl Eq for DisplayHint
impl StructuralPartialEq for DisplayHint
Auto Trait Implementations§
impl Freeze for DisplayHint
impl RefUnwindSafe for DisplayHint
impl Send for DisplayHint
impl Sync for DisplayHint
impl Unpin for DisplayHint
impl UnwindSafe for DisplayHint
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> 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.