pub enum Opt {
Optional,
Essential,
}Expand description
Optionality of a path part.
For example, [] | .a fails with an error, while [] | .a? returns nothing.
By default, path parts are essential, meaning that they fail.
Annotating them with ? makes them optional.
Variants§
Optional
Return nothing if the input cannot be accessed with the path
Essential
Fail if the input cannot be accessed with the path
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Opt
impl<'de> Deserialize<'de> for Opt
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