#[non_exhaustive]pub struct NotPresentEachValue;Expand description
An individual value that is not present - placeholder type
This is the “single” item type for encoding multiplicity
(for Items, Arguments or Objects), for NotPresent.
It should not be used directly.
During parsing, each “not present” item is ignored,
but the multiplicity arrangements involve parsing each value
and then passing the item value to ItemSetMethods::accumulate
where (for NotPresentEachValue) it is discarded.
Therefore this type must be inhabited; the item parser discards the unparsed item.
During parsing of arguments, parsing is driven by
[our ArgumentSetMethods::parse_with][P2MultiplicitySelector::<NotPresent>::parse_with) which doesn't need to call any parser. So the [ItemArgumentParseable`] implementation always throws an error.
During parsing of objects, rejection is done by
NotPresentEachValue::check_label (and from_bytes).
For encoding, there is only one multiplicity system which
will never call any encoding function, so the encoding functions all throw Bug.
This type has a similar role to IgnoredItemOrObjectValue,
but NotPresentEachValue is different in detail,
and (unlike Ignored) must support arguments, not just items and objects.
Trait Implementations§
Source§impl Clone for NotPresentEachValue
impl Clone for NotPresentEachValue
Source§fn clone(&self) -> NotPresentEachValue
fn clone(&self) -> NotPresentEachValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NotPresentEachValue
impl Debug for NotPresentEachValue
Source§impl ItemArgument for NotPresentEachValue
impl ItemArgument for NotPresentEachValue
Source§fn write_arg_onto(&self, _out: &mut ItemEncoder<'_>) -> Result<(), Bug>
fn write_arg_onto(&self, _out: &mut ItemEncoder<'_>) -> Result<(), Bug>
Source§impl ItemArgumentParseable for NotPresentEachValue
impl ItemArgumentParseable for NotPresentEachValue
Source§fn from_args<'s>(_: &mut ArgumentStream<'s>) -> Result<Self, ArgumentError>
fn from_args<'s>(_: &mut ArgumentStream<'s>) -> Result<Self, ArgumentError>
Source§impl ItemValueEncodable for NotPresentEachValue
impl ItemValueEncodable for NotPresentEachValue
Source§fn write_item_value_onto(&self, _out: ItemEncoder<'_>) -> Result<(), Bug>
fn write_item_value_onto(&self, _out: ItemEncoder<'_>) -> Result<(), Bug>
out Read moreSource§impl ItemValueParseable for NotPresentEachValue
impl ItemValueParseable for NotPresentEachValue
Source§fn from_unparsed<'s>(input: UnparsedItem<'s>) -> Result<Self, EP>
fn from_unparsed<'s>(input: UnparsedItem<'s>) -> Result<Self, EP>
Source§impl NetdocParseableFields for NotPresentEachValue
impl NetdocParseableFields for NotPresentEachValue
Source§type Accumulator = NotPresentEachValueNetdocParseAccumulator
type Accumulator = NotPresentEachValueNetdocParseAccumulator
Source§fn is_item_keyword(kw: KeywordRef<'_>) -> bool
fn is_item_keyword(kw: KeywordRef<'_>) -> bool
Source§fn accumulate_item(
acc: &mut Self::Accumulator,
item: UnparsedItem<'_>,
) -> Result<(), ErrorProblem>
fn accumulate_item( acc: &mut Self::Accumulator, item: UnparsedItem<'_>, ) -> Result<(), ErrorProblem>
Source§fn finish(
acc: Self::Accumulator,
items: &ItemStream<'_>,
) -> Result<Self, ErrorProblem>
fn finish( acc: Self::Accumulator, items: &ItemStream<'_>, ) -> Result<Self, ErrorProblem>
Auto Trait Implementations§
impl Freeze for NotPresentEachValue
impl RefUnwindSafe for NotPresentEachValue
impl Send for NotPresentEachValue
impl Sync for NotPresentEachValue
impl Unpin for NotPresentEachValue
impl UnsafeUnpin for NotPresentEachValue
impl UnwindSafe for NotPresentEachValue
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more