OptKind

Mojo struct 🡭

OptKind

@memory_only
struct OptKind

The viable types for an option to have.

Aliases

  • StringLike = OptKind(UInt8(0))
  • IntLike = OptKind(UInt8(1))
  • FloatLike = OptKind(UInt8(2))
  • BoolLike = OptKind(UInt8(3))

Fields

  • value (UInt8)

Implemented traits

AnyType, Copyable, Deinitable, ImplicitlyCopyable, Movable, Writable

Methods

 

__init__

def __init__(out self, value: UInt8)

DetailsArgs:

  • value (UInt8)
  • self (Self)

Returns:

Self

__eq__

def __eq__(self, other: Self) -> Bool

DetailsArgs:

  • self (Self)
  • other (Self)

Returns:

Bool

__ne__

def __ne__(self, other: Self) -> Bool

DetailsArgs:

  • self (Self)
  • other (Self)

Returns:

Bool

write_to

def write_to(self, mut writer: T)

DetailsArgs:

  • self (Self)
  • writer (T)