Skip to main content

Mojo struct

DictKeyError

struct DictKeyError[K: KeyElement]

A custom error type for Dict lookups that fail.

Parameters

  • K (KeyElement): The key type of the elements in the dictionary.

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 and the key to the writer.

Args:

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

Was this page helpful?