pub struct Parameters<'a, 'b>(/* private fields */);
Expand description
Parameter iterator for a command
Implementations§
Source§impl<'a, 'b> Parameters<'a, 'b>
impl<'a, 'b> Parameters<'a, 'b>
Source§impl<'a, 'b> Parameters<'a, 'b>
impl<'a, 'b> Parameters<'a, 'b>
Sourcepub fn next_optional_token(&mut self) -> Result<Option<Token<'a>>, Error>
pub fn next_optional_token(&mut self) -> Result<Option<Token<'a>>, Error>
Attempts to consume a data token. If no data token is found, None is returned.
Sourcepub fn next_token(&mut self) -> Result<Token<'a>, Error>
pub fn next_token(&mut self) -> Result<Token<'a>, Error>
Get next data token. If no data is found a error with ErrorCode::MissingParameter is returned instead.
Sourcepub fn next_data<T>(&mut self) -> Result<T, Error>
pub fn next_data<T>(&mut self) -> Result<T, Error>
Same as Self::next_token
but attempts to convert the data token into type T.
If no data is found a error with ErrorCode::MissingParameter is returned instead.
If the data conversion fails a corresponding error is returned.
Sourcepub fn next_optional_data<T>(&mut self) -> Result<Option<T>, Error>
pub fn next_optional_data<T>(&mut self) -> Result<Option<T>, Error>
Same as Self::next_optional_token
but attempts to convert the data token into type T.
If no data is found, None is returned instead.
If the data conversion fails a corresponding error is returned.
Auto Trait Implementations§
impl<'a, 'b> Freeze for Parameters<'a, 'b>
impl<'a, 'b> RefUnwindSafe for Parameters<'a, 'b>
impl<'a, 'b> Send for Parameters<'a, 'b>
impl<'a, 'b> Sync for Parameters<'a, 'b>
impl<'a, 'b> Unpin for Parameters<'a, 'b>
impl<'a, 'b> !UnwindSafe for Parameters<'a, 'b>
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