v0.4.0

CollectionError enumv0.1.0

Source
Why a collection operation could not be completed.
pub enum CollectionError: uint8 {
    IndexOutOfRange = 1
}

Every case means the operation did not happen and the collection is as it was.

Cases

NameValueDescription
IndexOutOfRange1The index was not one the collection has.

Implements Display

CollectionError conforms to Display.

WriteDisplay

pub func WriteDisplay(
    &self,
    writer: &var TextWriter,
    spec: FormatSpec
) throws FormatError

Writes the description of why an operation did not happen, or no error for success. The descriptions are stable. They are not a parsing contract: a program branches on the case. Reports whatever the writer reported, and UnsupportedRequest for any style or precision.

NameTypeDescription
writer&var TextWriterthe destination
specFormatSpecwhat the placeholder asked for

Returns: success when the whole description was accepted

Source

Implements Debug

CollectionError conforms to Debug.

WriteDebug

pub func WriteDebug(
    &self,
    writer: &var TextWriter,
    spec: FormatSpec
) throws FormatError

Names the case, qualified by its type: CollectionError::IndexOutOfRange. Reports whatever the writer reported, and UnsupportedRequest for any style or precision.

NameTypeDescription
writer&var TextWriterthe destination
specFormatSpecwhat the placeholder asked for

Returns: success when the whole name was accepted

Source