pub struct MultiplicitySelector<Field>(/* private fields */);Available on crate feature
parse2 only.Expand description
Helper type that allows us to select an impl of ItemSetMethods etc.
For use by macros.
See the module-level docs.
Trait Implementations§
Source§impl<T> ArgumentSetMethods for &MultiplicitySelector<T>
impl<T> ArgumentSetMethods for &MultiplicitySelector<T>
Source§fn parse_with<P>(
self,
args: &mut ArgumentStream<'_>,
parser: P,
) -> Result<Self::Field, AE>
fn parse_with<P>( self, args: &mut ArgumentStream<'_>, parser: P, ) -> Result<Self::Field, AE>
Parse zero or more argument(s) into
Self::Field.Source§fn check_argument_value_parseable(self)where
Self::Each: ItemArgumentParseable,
fn check_argument_value_parseable(self)where
Self::Each: ItemArgumentParseable,
Check that the element type is an Argument Read more
Source§impl<T: Ord> ArgumentSetMethods for MultiplicitySelector<BTreeSet<T>>
impl<T: Ord> ArgumentSetMethods for MultiplicitySelector<BTreeSet<T>>
Source§fn parse_with<P>(
self,
args: &mut ArgumentStream<'_>,
parser: P,
) -> Result<Self::Field, AE>
fn parse_with<P>( self, args: &mut ArgumentStream<'_>, parser: P, ) -> Result<Self::Field, AE>
Parse zero or more argument(s) into
Self::Field.Source§fn check_argument_value_parseable(self)where
Self::Each: ItemArgumentParseable,
fn check_argument_value_parseable(self)where
Self::Each: ItemArgumentParseable,
Check that the element type is an Argument Read more
Source§impl<T> ArgumentSetMethods for MultiplicitySelector<Option<T>>
impl<T> ArgumentSetMethods for MultiplicitySelector<Option<T>>
Source§fn parse_with<P>(
self,
args: &mut ArgumentStream<'_>,
parser: P,
) -> Result<Self::Field, AE>
fn parse_with<P>( self, args: &mut ArgumentStream<'_>, parser: P, ) -> Result<Self::Field, AE>
Parse zero or more argument(s) into
Self::Field.Source§fn check_argument_value_parseable(self)where
Self::Each: ItemArgumentParseable,
fn check_argument_value_parseable(self)where
Self::Each: ItemArgumentParseable,
Check that the element type is an Argument Read more
Source§impl<T> ArgumentSetMethods for MultiplicitySelector<Vec<T>>
impl<T> ArgumentSetMethods for MultiplicitySelector<Vec<T>>
Source§fn parse_with<P>(
self,
args: &mut ArgumentStream<'_>,
parser: P,
) -> Result<Self::Field, AE>
fn parse_with<P>( self, args: &mut ArgumentStream<'_>, parser: P, ) -> Result<Self::Field, AE>
Parse zero or more argument(s) into
Self::Field.Source§fn check_argument_value_parseable(self)where
Self::Each: ItemArgumentParseable,
fn check_argument_value_parseable(self)where
Self::Each: ItemArgumentParseable,
Check that the element type is an Argument Read more
Source§impl<Field> Clone for MultiplicitySelector<Field>
impl<Field> Clone for MultiplicitySelector<Field>
Source§impl<Field> Default for MultiplicitySelector<Field>
impl<Field> Default for MultiplicitySelector<Field>
Source§impl<T> ItemSetMethods for &MultiplicitySelector<T>
impl<T> ItemSetMethods for &MultiplicitySelector<T>
Source§fn can_accumulate(self, acc: &Option<T>) -> Result<(), EP>
fn can_accumulate(self, acc: &Option<T>) -> Result<(), EP>
Can we accumulate another item ? Read more
Source§fn accumulate(self, acc: &mut Option<T>, item: T) -> Result<(), EP>
fn accumulate(self, acc: &mut Option<T>, item: T) -> Result<(), EP>
Accumulate one value into the accumulator.
Source§fn finish(self, acc: Option<T>, keyword: &'static str) -> Result<T, EP>
fn finish(self, acc: Option<T>, keyword: &'static str) -> Result<T, EP>
Resolve the accumulator into the output.
Source§fn is_intro_item_keyword(self, kw: KeywordRef<'_>) -> boolwhere
Self::Each: NetdocParseable,
fn is_intro_item_keyword(self, kw: KeywordRef<'_>) -> boolwhere
Self::Each: NetdocParseable,
If the contained type is a sub-document, call its
is_intro_item_keyword.Source§fn finish_subdoc(self, acc: Option<Self::Field>) -> Result<Self::Field, EP>where
Self::Each: NetdocParseable,
fn finish_subdoc(self, acc: Option<Self::Field>) -> Result<Self::Field, EP>where
Self::Each: NetdocParseable,
finish for if the contained type is a wsub-document Read moreSource§fn check_item_value_parseable(self)where
Self::Each: ItemValueParseable,
fn check_item_value_parseable(self)where
Self::Each: ItemValueParseable,
Check that the element type is an Item Read more
Source§fn check_signature_item_parseable(self)where
Self::Each: SignatureItemParseable,
fn check_signature_item_parseable(self)where
Self::Each: SignatureItemParseable,
Check that the element type is a Signature
Source§fn check_subdoc_parseable(self)where
Self::Each: NetdocParseable,
fn check_subdoc_parseable(self)where
Self::Each: NetdocParseable,
Check that the element type is a sub-document
Source§fn check_item_argument_parseable(self)where
Self::Each: ItemArgumentParseable,
fn check_item_argument_parseable(self)where
Self::Each: ItemArgumentParseable,
Check that the element type is an argument
Source§impl<T: Ord> ItemSetMethods for MultiplicitySelector<BTreeSet<T>>
impl<T: Ord> ItemSetMethods for MultiplicitySelector<BTreeSet<T>>
Source§fn can_accumulate(self, _acc: &Option<BTreeSet<T>>) -> Result<(), EP>
fn can_accumulate(self, _acc: &Option<BTreeSet<T>>) -> Result<(), EP>
Can we accumulate another item ? Read more
Source§fn accumulate(self, acc: &mut Option<BTreeSet<T>>, item: T) -> Result<(), EP>
fn accumulate(self, acc: &mut Option<BTreeSet<T>>, item: T) -> Result<(), EP>
Accumulate one value into the accumulator.
Source§fn finish(
self,
acc: Option<BTreeSet<T>>,
_keyword: &'static str,
) -> Result<BTreeSet<T>, EP>
fn finish( self, acc: Option<BTreeSet<T>>, _keyword: &'static str, ) -> Result<BTreeSet<T>, EP>
Resolve the accumulator into the output.
Source§fn is_intro_item_keyword(self, kw: KeywordRef<'_>) -> boolwhere
Self::Each: NetdocParseable,
fn is_intro_item_keyword(self, kw: KeywordRef<'_>) -> boolwhere
Self::Each: NetdocParseable,
If the contained type is a sub-document, call its
is_intro_item_keyword.Source§fn finish_subdoc(self, acc: Option<Self::Field>) -> Result<Self::Field, EP>where
Self::Each: NetdocParseable,
fn finish_subdoc(self, acc: Option<Self::Field>) -> Result<Self::Field, EP>where
Self::Each: NetdocParseable,
finish for if the contained type is a wsub-document Read moreSource§fn check_item_value_parseable(self)where
Self::Each: ItemValueParseable,
fn check_item_value_parseable(self)where
Self::Each: ItemValueParseable,
Check that the element type is an Item Read more
Source§fn check_signature_item_parseable(self)where
Self::Each: SignatureItemParseable,
fn check_signature_item_parseable(self)where
Self::Each: SignatureItemParseable,
Check that the element type is a Signature
Source§fn check_subdoc_parseable(self)where
Self::Each: NetdocParseable,
fn check_subdoc_parseable(self)where
Self::Each: NetdocParseable,
Check that the element type is a sub-document
Source§fn check_item_argument_parseable(self)where
Self::Each: ItemArgumentParseable,
fn check_item_argument_parseable(self)where
Self::Each: ItemArgumentParseable,
Check that the element type is an argument
Source§impl ItemSetMethods for MultiplicitySelector<NotPresent>
impl ItemSetMethods for MultiplicitySelector<NotPresent>
Source§type Field = NotPresent
type Field = NotPresent
The output type: the type of the field in the netdoc struct.
Source§fn can_accumulate(self, _acc: &Option<NotPresent>) -> Result<(), EP>
fn can_accumulate(self, _acc: &Option<NotPresent>) -> Result<(), EP>
Can we accumulate another item ? Read more
Source§fn accumulate(
self,
_acc: &mut Option<NotPresent>,
_item: Ignored,
) -> Result<(), EP>
fn accumulate( self, _acc: &mut Option<NotPresent>, _item: Ignored, ) -> Result<(), EP>
Accumulate one value into the accumulator.
Source§fn finish(
self,
_acc: Option<NotPresent>,
_: &'static str,
) -> Result<NotPresent, EP>
fn finish( self, _acc: Option<NotPresent>, _: &'static str, ) -> Result<NotPresent, EP>
Resolve the accumulator into the output.
Source§fn check_item_value_parseable(self)where
Self::Each: ItemValueParseable,
fn check_item_value_parseable(self)where
Self::Each: ItemValueParseable,
Check that the element type is an Item Read more
Source§fn check_item_argument_parseable(self)where
Self::Each: ItemArgumentParseable,
fn check_item_argument_parseable(self)where
Self::Each: ItemArgumentParseable,
Check that the element type is an argument
Source§impl<T> ItemSetMethods for MultiplicitySelector<Option<T>>
impl<T> ItemSetMethods for MultiplicitySelector<Option<T>>
Source§fn can_accumulate(self, acc: &Option<Option<T>>) -> Result<(), EP>
fn can_accumulate(self, acc: &Option<Option<T>>) -> Result<(), EP>
Can we accumulate another item ? Read more
Source§fn accumulate(self, acc: &mut Option<Option<T>>, item: T) -> Result<(), EP>
fn accumulate(self, acc: &mut Option<Option<T>>, item: T) -> Result<(), EP>
Accumulate one value into the accumulator.
Source§fn finish(
self,
acc: Option<Option<T>>,
_keyword: &'static str,
) -> Result<Option<T>, EP>
fn finish( self, acc: Option<Option<T>>, _keyword: &'static str, ) -> Result<Option<T>, EP>
Resolve the accumulator into the output.
Source§fn is_intro_item_keyword(self, kw: KeywordRef<'_>) -> boolwhere
Self::Each: NetdocParseable,
fn is_intro_item_keyword(self, kw: KeywordRef<'_>) -> boolwhere
Self::Each: NetdocParseable,
If the contained type is a sub-document, call its
is_intro_item_keyword.Source§fn finish_subdoc(self, acc: Option<Self::Field>) -> Result<Self::Field, EP>where
Self::Each: NetdocParseable,
fn finish_subdoc(self, acc: Option<Self::Field>) -> Result<Self::Field, EP>where
Self::Each: NetdocParseable,
finish for if the contained type is a wsub-document Read moreSource§fn check_item_value_parseable(self)where
Self::Each: ItemValueParseable,
fn check_item_value_parseable(self)where
Self::Each: ItemValueParseable,
Check that the element type is an Item Read more
Source§fn check_signature_item_parseable(self)where
Self::Each: SignatureItemParseable,
fn check_signature_item_parseable(self)where
Self::Each: SignatureItemParseable,
Check that the element type is a Signature
Source§fn check_subdoc_parseable(self)where
Self::Each: NetdocParseable,
fn check_subdoc_parseable(self)where
Self::Each: NetdocParseable,
Check that the element type is a sub-document
Source§fn check_item_argument_parseable(self)where
Self::Each: ItemArgumentParseable,
fn check_item_argument_parseable(self)where
Self::Each: ItemArgumentParseable,
Check that the element type is an argument
Source§impl<T> ItemSetMethods for MultiplicitySelector<Vec<T>>
impl<T> ItemSetMethods for MultiplicitySelector<Vec<T>>
Source§fn can_accumulate(self, _acc: &Option<Vec<T>>) -> Result<(), EP>
fn can_accumulate(self, _acc: &Option<Vec<T>>) -> Result<(), EP>
Can we accumulate another item ? Read more
Source§fn accumulate(self, acc: &mut Option<Vec<T>>, item: T) -> Result<(), EP>
fn accumulate(self, acc: &mut Option<Vec<T>>, item: T) -> Result<(), EP>
Accumulate one value into the accumulator.
Source§fn finish(
self,
acc: Option<Vec<T>>,
_keyword: &'static str,
) -> Result<Vec<T>, EP>
fn finish( self, acc: Option<Vec<T>>, _keyword: &'static str, ) -> Result<Vec<T>, EP>
Resolve the accumulator into the output.
Source§fn is_intro_item_keyword(self, kw: KeywordRef<'_>) -> boolwhere
Self::Each: NetdocParseable,
fn is_intro_item_keyword(self, kw: KeywordRef<'_>) -> boolwhere
Self::Each: NetdocParseable,
If the contained type is a sub-document, call its
is_intro_item_keyword.Source§fn finish_subdoc(self, acc: Option<Self::Field>) -> Result<Self::Field, EP>where
Self::Each: NetdocParseable,
fn finish_subdoc(self, acc: Option<Self::Field>) -> Result<Self::Field, EP>where
Self::Each: NetdocParseable,
finish for if the contained type is a wsub-document Read moreSource§fn check_item_value_parseable(self)where
Self::Each: ItemValueParseable,
fn check_item_value_parseable(self)where
Self::Each: ItemValueParseable,
Check that the element type is an Item Read more
Source§fn check_signature_item_parseable(self)where
Self::Each: SignatureItemParseable,
fn check_signature_item_parseable(self)where
Self::Each: SignatureItemParseable,
Check that the element type is a Signature
Source§fn check_subdoc_parseable(self)where
Self::Each: NetdocParseable,
fn check_subdoc_parseable(self)where
Self::Each: NetdocParseable,
Check that the element type is a sub-document
Source§fn check_item_argument_parseable(self)where
Self::Each: ItemArgumentParseable,
fn check_item_argument_parseable(self)where
Self::Each: ItemArgumentParseable,
Check that the element type is an argument
Source§impl<T> ObjectSetMethods for &MultiplicitySelector<T>
impl<T> ObjectSetMethods for &MultiplicitySelector<T>
Source§fn resolve_option(self, found: Option<Self::Each>) -> Result<Self::Field, EP>
fn resolve_option(self, found: Option<Self::Each>) -> Result<Self::Field, EP>
Parse zero or more argument(s) into
Self::Field.Source§fn check_label(self, label: &str) -> Result<(), EP>where
Self::Each: ItemObjectParseable,
fn check_label(self, label: &str) -> Result<(), EP>where
Self::Each: ItemObjectParseable,
If the contained type is
ItemObjectParseable, call its check_labelSource§fn check_object_parseable(self)where
Self::Each: ItemObjectParseable,
fn check_object_parseable(self)where
Self::Each: ItemObjectParseable,
Check that the contained type can be parsed as an object
Source§impl ObjectSetMethods for MultiplicitySelector<Ignored>
impl ObjectSetMethods for MultiplicitySelector<Ignored>
Source§fn resolve_option(self, _found: Option<Ignored>) -> Result<Ignored, EP>
fn resolve_option(self, _found: Option<Ignored>) -> Result<Ignored, EP>
Parse zero or more argument(s) into
Self::Field.Source§fn check_label(self, label: &str) -> Result<(), EP>where
Self::Each: ItemObjectParseable,
fn check_label(self, label: &str) -> Result<(), EP>where
Self::Each: ItemObjectParseable,
If the contained type is
ItemObjectParseable, call its check_labelSource§fn check_object_parseable(self)where
Self::Each: ItemObjectParseable,
fn check_object_parseable(self)where
Self::Each: ItemObjectParseable,
Check that the contained type can be parsed as an object
Source§impl ObjectSetMethods for MultiplicitySelector<NotPresent>
impl ObjectSetMethods for MultiplicitySelector<NotPresent>
Source§type Field = NotPresent
type Field = NotPresent
The output type: the type of the field in the Item struct.
Source§fn resolve_option(self, _found: Option<Void>) -> Result<NotPresent, EP>
fn resolve_option(self, _found: Option<Void>) -> Result<NotPresent, EP>
Parse zero or more argument(s) into
Self::Field.Source§fn check_label(self, label: &str) -> Result<(), EP>where
Self::Each: ItemObjectParseable,
fn check_label(self, label: &str) -> Result<(), EP>where
Self::Each: ItemObjectParseable,
If the contained type is
ItemObjectParseable, call its check_labelSource§fn check_object_parseable(self)where
Self::Each: ItemObjectParseable,
fn check_object_parseable(self)where
Self::Each: ItemObjectParseable,
Check that the contained type can be parsed as an object
Source§impl<T> ObjectSetMethods for MultiplicitySelector<Option<T>>
impl<T> ObjectSetMethods for MultiplicitySelector<Option<T>>
Source§fn resolve_option(self, found: Option<Self::Each>) -> Result<Self::Field, EP>
fn resolve_option(self, found: Option<Self::Each>) -> Result<Self::Field, EP>
Parse zero or more argument(s) into
Self::Field.Source§fn check_label(self, label: &str) -> Result<(), EP>where
Self::Each: ItemObjectParseable,
fn check_label(self, label: &str) -> Result<(), EP>where
Self::Each: ItemObjectParseable,
If the contained type is
ItemObjectParseable, call its check_labelSource§fn check_object_parseable(self)where
Self::Each: ItemObjectParseable,
fn check_object_parseable(self)where
Self::Each: ItemObjectParseable,
Check that the contained type can be parsed as an object
impl<Field> Copy for MultiplicitySelector<Field>
Auto Trait Implementations§
impl<Field> Freeze for MultiplicitySelector<Field>
impl<Field> RefUnwindSafe for MultiplicitySelector<Field>
impl<Field> Send for MultiplicitySelector<Field>
impl<Field> Sync for MultiplicitySelector<Field>
impl<Field> Unpin for MultiplicitySelector<Field>
impl<Field> UnwindSafe for MultiplicitySelector<Field>
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&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>
Converts
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>
Converts
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