pub struct Args<S: ?Sized>(/* private fields */);Expand description
Remaining unparsed arguments.
Implementations§
Source§impl<S: Source + ?Sized> Args<S>
impl<S: Source + ?Sized> Args<S>
Sourcepub fn parse<T: FromArgs>(&mut self, field: Ident) -> FromArgsResult<T>
pub fn parse<T: FromArgs>(&mut self, field: Ident) -> FromArgsResult<T>
Parse the value of a field.
This method is like FromArgs::from_args except that it attaches the field context to a returned error.
Sourcepub fn branch<T, const LEN: usize>(
&mut self,
branches: [(&'static str, fn(args: &mut Args<S>) -> FromArgsResult<T>); LEN],
) -> FromArgsResult<T>
pub fn branch<T, const LEN: usize>( &mut self, branches: [(&'static str, fn(args: &mut Args<S>) -> FromArgsResult<T>); LEN], ) -> FromArgsResult<T>
Parse the rest of args with the parser tupled with the string that matches the first arg.
This method will return an error if the first arg does not match any of the variants or if parsing the rest of the args returns an error.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Args<S>
impl<S> RefUnwindSafe for Args<S>where
S: RefUnwindSafe + ?Sized,
impl<S> Send for Args<S>
impl<S> Sync for Args<S>
impl<S> Unpin for Args<S>
impl<S> UnwindSafe for Args<S>where
S: UnwindSafe + ?Sized,
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