pub struct DetailedMappingRule {
pub path: String,
pub default: Option<Value>,
pub required: bool,
}Expand description
Full mapping form with a fallback value and/or a presence requirement.
Fields§
§path: StringSource path in the input document (e.g. $.user.id, user.id, $.items[0]).
default: Option<Value>Value used when the source path is absent.
required: boolReject the message when the source path is absent and no default is set.
Trait Implementations§
Source§impl Clone for DetailedMappingRule
impl Clone for DetailedMappingRule
Source§fn clone(&self) -> DetailedMappingRule
fn clone(&self) -> DetailedMappingRule
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 DetailedMappingRule
impl Debug for DetailedMappingRule
Source§impl<'de> Deserialize<'de> for DetailedMappingRule
impl<'de> Deserialize<'de> for DetailedMappingRule
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 DetailedMappingRule
impl RefUnwindSafe for DetailedMappingRule
impl Send for DetailedMappingRule
impl Sync for DetailedMappingRule
impl Unpin for DetailedMappingRule
impl UnsafeUnpin for DetailedMappingRule
impl UnwindSafe for DetailedMappingRule
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