CollectionError enumv0.1.0
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
| Name | Value | Description |
|---|---|---|
IndexOutOfRange | 1 | The 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.
| Name | Type | Description |
|---|---|---|
writer | &var TextWriter | the destination |
spec | FormatSpec | what the placeholder asked for |
Returns: success when the whole description was accepted
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.
| Name | Type | Description |
|---|---|---|
writer | &var TextWriter | the destination |
spec | FormatSpec | what the placeholder asked for |
Returns: success when the whole name was accepted