pub struct ConfigurationParserFn { /* private fields */ }
Expand description

Builder struct.

Implementations§

source§

impl ConfigurationParserFn

source

pub fn new<F: AsRef<str>>(supported_format: F, parser: BoxedParserFn) -> Self

source

pub fn set_parser(&mut self, parser: BoxedParserFn)

source

pub fn with_parser(self, parser: BoxedParserFn) -> Self

source

pub fn set_validator(&mut self, validator: BoxedValidatorFn)

source

pub fn with_validator(self, validator: BoxedValidatorFn) -> Self

source

pub fn set_format_list<N: AsRef<str>>(&mut self, format_list: &[N])

source

pub fn with_format_list<N: AsRef<str>>(self, format_list: &[N]) -> Self

source

pub fn set_modifier(&mut self, modifier: BoxedModifierFn)

source

pub fn with_modifier(self, modifier: BoxedModifierFn) -> Self

Trait Implementations§

source§

impl ConfigurationParser for ConfigurationParserFn

source§

fn supported_format_list(&self) -> Vec<String>

Supported format list (e.g. “yml”)
source§

fn try_parse(&self, bytes: &[u8]) -> Result<Input, ConfigurationParserError>

Parses a byte slice to Input.
source§

fn is_format_supported(&self, bytes: &[u8]) -> Option<bool>

Checks if provided byte slice is ok for future parsing.
source§

impl Debug for ConfigurationParserFn

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ConfigurationParserFn

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.