pub struct ChoiceSlot<'a> {
pub suffix: Option<&'static str>,
pub value: Option<&'a Value>,
pub element: Option<&'a Value>,
}Expand description
The parts of one choice element met while reading an object.
Fields§
§suffix: Option<&'static str>The type suffix of the key seen, for example String for valueString.
value: Option<&'a Value>The value part.
element: Option<&'a Value>The _name part.
Implementations§
Source§impl<'a> ChoiceSlot<'a>
impl<'a> ChoiceSlot<'a>
Sourcepub fn value(
&mut self,
suffix: &'static str,
value: &'a Value,
path: &Path,
) -> Result<(), DecodeError>
pub fn value( &mut self, suffix: &'static str, value: &'a Value, path: &Path, ) -> Result<(), DecodeError>
Records the value part of the form suffix.
§Errors
Returns DecodeError when another form was already seen.
Sourcepub fn element(
&mut self,
suffix: &'static str,
element: &'a Value,
path: &Path,
) -> Result<(), DecodeError>
pub fn element( &mut self, suffix: &'static str, element: &'a Value, path: &Path, ) -> Result<(), DecodeError>
Records the _name part of the form suffix.
§Errors
Returns DecodeError when another form was already seen.
Trait Implementations§
Source§impl<'a> Debug for ChoiceSlot<'a>
impl<'a> Debug for ChoiceSlot<'a>
Auto Trait Implementations§
impl<'a> Freeze for ChoiceSlot<'a>
impl<'a> RefUnwindSafe for ChoiceSlot<'a>
impl<'a> Send for ChoiceSlot<'a>
impl<'a> Sync for ChoiceSlot<'a>
impl<'a> Unpin for ChoiceSlot<'a>
impl<'a> UnsafeUnpin for ChoiceSlot<'a>
impl<'a> UnwindSafe for ChoiceSlot<'a>
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