pub fn language(
        mut self,
        name: impl Into<Cow<'static, str>>,
    ) -> Result<Self, UnsupportedLanguageError> {
        let name = name.into();
        if !gherkin::is_language_supported(&name) {
            return Err(UnsupportedLanguageError(name));
        }
        self.language = Some(name);
        Ok(self)
    }
/// Sets the provided language to parse [`gherkin`] files with instead of
/// the default one (English).
///
/// # Errors
///
/// If the provided language isn't supported.
Sets the provided language to parse [`gherkin`] files with instead of
the default one (English).
Sets the provided language to parse [ ` gherkin ` ] files with instead of the default one ( English ) .
pub fn language(
        mut self,
        name: impl Into<Cow<'static, str>>,
    ) -> Result<Self, UnsupportedLanguageError> {
        let name = name.into();
        if !gherkin::is_language_supported(&name) {
            return Err(UnsupportedLanguageError(name));
        }
        self.language = Some(name);
        Ok(self)
    }
pub fn language ( mut self , name : impl Into < Cow < ' static , str > > , ) -> Result < Self , UnsupportedLanguageError > { let name = name . into ( ) ; if ! gherkin :: is_language_supported ( & name ) { return Err ( UnsupportedLanguageError ( name ) ) ; } self . language = Some ( name ) ; Ok ( self ) }
Sets the provided language to parse [`gherkin`] files with instead of
the default one (English).
Sets the provided language to parse [ ` gherkin ` ] files with instead of the default one ( English ) .
mut self
name
impl Into<Cow<'static, str>>
mut self
name
impl Into<Cow<'static, str>>
errors
If the provided language isn't supported.
If the provided language isn ' t supported .