IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: 1.0
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

EmptyOptionalError

struct EmptyOptionalError[T: AnyType]

An error type for when an empty Optional is accessed.

Parameters

  • T (AnyType): The type of the value that was accessed in the Optional.

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable, RegisterPassable, Writable

Methods

write_to

write_to(self, mut writer: T)

Write the error to a Writer.

Args:

  • writer (T): The Writer to write to.

write_repr_to

write_repr_to(self, mut writer: T)

Write the error to a Writer.

Args:

  • writer (T): The Writer to write to.