pub enum TextOrValue {
Text(String),
Value {
value: String,
},
}Expand description
A value that Open Library sometimes returns as a plain string and sometimes as
{ "value": "..." }. Use TextOrValue::into_text() to normalise.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for TextOrValue
impl Clone for TextOrValue
Source§fn clone(&self) -> TextOrValue
fn clone(&self) -> TextOrValue
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 moreSource§impl Debug for TextOrValue
impl Debug for TextOrValue
Source§impl<'de> Deserialize<'de> for TextOrValue
impl<'de> Deserialize<'de> for TextOrValue
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
Auto Trait Implementations§
impl Freeze for TextOrValue
impl RefUnwindSafe for TextOrValue
impl Send for TextOrValue
impl Sync for TextOrValue
impl Unpin for TextOrValue
impl UnsafeUnpin for TextOrValue
impl UnwindSafe for TextOrValue
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