pub enum Opt {
Optional,
Essential,
}Expand description
Optionality of a path part, i.e. whether ? is present.
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§
Auto Trait Implementations§
impl Freeze for Opt
impl RefUnwindSafe for Opt
impl Send for Opt
impl Sync for Opt
impl Unpin for Opt
impl UnwindSafe for Opt
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