Skip to main content

Mojo struct

EmptyOptionalError

@register_passable 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, Writable

comptime members

__copyinit__is_trivial

comptime __copyinit__is_trivial = True

__del__is_trivial

comptime __del__is_trivial = True

__moveinit__is_trivial

comptime __moveinit__is_trivial = True

Methods

write_to

write_to(self, mut writer: T)

Write the error to a Writer.

Args:

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

Was this page helpful?