pub enum LocationItem {
Key(String),
Index(usize),
}Expand description
One segment of a field location path (loc in Pydantic).
Serialized untagged, so a key becomes a JSON string and an index a JSON number.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for LocationItem
impl Clone for LocationItem
Source§fn clone(&self) -> LocationItem
fn clone(&self) -> LocationItem
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 LocationItem
impl Debug for LocationItem
Source§impl<'de> Deserialize<'de> for LocationItem
impl<'de> Deserialize<'de> for LocationItem
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 Display for LocationItem
impl Display for LocationItem
impl Eq for LocationItem
Source§impl From<&str> for LocationItem
impl From<&str> for LocationItem
Source§impl From<String> for LocationItem
impl From<String> for LocationItem
Source§impl From<usize> for LocationItem
impl From<usize> for LocationItem
Source§impl Hash for LocationItem
impl Hash for LocationItem
Source§impl PartialEq for LocationItem
impl PartialEq for LocationItem
Source§impl Serialize for LocationItem
impl Serialize for LocationItem
impl StructuralPartialEq for LocationItem
Auto Trait Implementations§
impl Freeze for LocationItem
impl RefUnwindSafe for LocationItem
impl Send for LocationItem
impl Sync for LocationItem
impl Unpin for LocationItem
impl UnsafeUnpin for LocationItem
impl UnwindSafe for LocationItem
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.