pub enum FormattingError {
    UnbalancedBrackets(usize),
    EmptyNameSegment(usize),
    EmptyOptionName(usize),
    UnknownFlag(Stringchar),
    UnknownOption(StringString),
    InvalidOptionValue(StringStringString),
    NamespaceOnlyFmt(String),
    WrongNumberOfArguments(StringOrderingusize),
    InvalidArgument(StringusizeString),
    UnknownFmt(String),
}
Expand description

Any error that can happen during formatting.

Variants

UnbalancedBrackets(usize)

Returned when the brackets in the format string are not balanced. Contains the byte address of the offending bracket.

EmptyNameSegment(usize)

Returned when a placeholder in the format string has an empty name segment. Contains the byte offset of the empty segment.

EmptyOptionName(usize)

Returned when a placeholder’s option has an empty name. Contains the byte offset of the place where the name should have been.

UnknownFlag(Stringchar)

A SingleFmtError::UnknownFlag is propagated as this.

UnknownOption(StringString)

A SingleFmtError::UnknownOption is propagated as this.

InvalidOptionValue(StringStringString)

A SingleFmtError::InvalidOptionValue is propagated as this.

NamespaceOnlyFmt(String)

A SingleFmtError::NamespaceOnlyFmt is propagated as this.

WrongNumberOfArguments(StringOrderingusize)

A SingleFmtError::WrongNumberOfArguments is propagated as this.

InvalidArgument(StringusizeString)

A SingleFmtError::InvalidArgument is propagated as this.

UnknownFmt(String)

Returned when a requested Fmt does not exist (or cannot be created) in the format table. A SingleFmtError::UnknownSubfmt is also propagated as this. Contains the full path to the failed format unit.

Trait Implementations

Formats the value using the given formatter. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.