Enum ketos::string_fmt::FormatError [] [src]

pub enum FormatError {
    Error(Box<str>),
    ExtraFields,
    FieldOverflow,
    FieldTypeError {
        expected: &'static str,
        found: &'static str,
    },
    IncompleteDirective,
    IncorrectCloseDelim(char),
    IncorrectFlags,
    InfiniteLoop,
    InsufficientArguments,
    IntegerOverflow,
    InvalidFlags,
    InvalidRadix(u32),
    MisplacedDirective,
    MissingCloseDelim(char),
    MissingBranch,
    ExtraBranch,
    TypeError {
        expected: &'static str,
        found: &'static str,
    },
    UnrecognizedDirective(char),
}

Represents an error in formatting a string.

Variants

Error(Box<str>)

Error message

ExtraFields

Extraneous fields to directive

FieldOverflow

Field value exceeded expected range

FieldTypeError

Wrong type to field value

Fields

expected: &'static str

Type of value expected

found: &'static str

Type found

IncompleteDirective

End of format string reached before directive completed

IncorrectCloseDelim(char)

Group-closing directive encountered without matching opener

IncorrectFlags

Incorrect flags given to directive

InfiniteLoop

Infinite loop detected in iteration directive ~{...~}

InsufficientArguments

Insufficient arguments to format string

IntegerOverflow

Overflow converting a value to Integer

InvalidFlags

Invalid flags specifier

InvalidRadix(u32)

Invalid radix to ~r directive

MisplacedDirective

Directive encountered where it is not expected

MissingCloseDelim(char)

End of format string reached with open grouping directive

MissingBranch

Missing required branch within a conditional directive

ExtraBranch

End of branch directive found where end of conditional was expected

TypeError

Argument value of incorrect type received

Fields

expected: &'static str

Expected value type

found: &'static str

Type found

UnrecognizedDirective(char)

Unrecognized directive character

Methods

impl FormatError
[src]

fn expected(ty: &'static str, v: &Value) -> FormatError

Convenience function to return a TypeError value when expected type is expected, but some other type of value is found.

Trait Implementations

impl PartialEq for FormatError
[src]

fn eq(&self, __arg_0: &FormatError) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &FormatError) -> bool

This method tests for !=.

impl Eq for FormatError
[src]

impl Debug for FormatError
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for FormatError
[src]

fn clone(&self) -> FormatError

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Display for FormatError
[src]

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

Formats the value using the given formatter.