ParseArgumentWith

Trait ParseArgumentWith 

Source
pub(crate) trait ParseArgumentWith {
    type With;

    // Required method
    fn handle_argument_with<'a>(
        &mut self,
        meta: &ParseNestedMeta<'_>,
        with: Self::With,
        key: &str,
        error: impl Into<ArgumentError<'a>>,
    ) -> Result<bool>;

    // Provided method
    fn parse_argument_with<'a>(
        &mut self,
        meta: &ParseNestedMeta<'_>,
        with: Self::With,
        key: &str,
        error: impl Into<ArgumentError<'a>>,
    ) -> Result<bool> { ... }
}

Required Associated Types§

Required Methods§

Source

fn handle_argument_with<'a>( &mut self, meta: &ParseNestedMeta<'_>, with: Self::With, key: &str, error: impl Into<ArgumentError<'a>>, ) -> Result<bool>

Provided Methods§

Source

fn parse_argument_with<'a>( &mut self, meta: &ParseNestedMeta<'_>, with: Self::With, key: &str, error: impl Into<ArgumentError<'a>>, ) -> Result<bool>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ParseArgumentWith for bool

Source§

type With = bool

Source§

fn handle_argument_with<'a>( &mut self, meta: &ParseNestedMeta<'_>, with: bool, key: &str, error: impl Into<ArgumentError<'a>>, ) -> Result<bool>

Source§

impl<T> ParseArgumentWith for Option<T>

Source§

type With = T

Source§

fn handle_argument_with<'a>( &mut self, meta: &ParseNestedMeta<'_>, with: T, key: &str, error: impl Into<ArgumentError<'a>>, ) -> Result<bool>

Source§

impl<T> ParseArgumentWith for Vec<T>

Source§

type With = Punctuated<T, Comma>

Source§

fn handle_argument_with<'a>( &mut self, meta: &ParseNestedMeta<'_>, with: Punctuated<T, Comma>, key: &str, error: impl Into<ArgumentError<'a>>, ) -> Result<bool>

Implementors§