Skip to content

Strand

Mojo struct 🡭

@register_passable_trivial
struct Strand

Strand of a BED feature: Plus (+), Minus (-), or Unknown (.).

When the strand field is absent (BED5 or fewer columns), the enclosing Optional[Strand] is None — distinguishable from an explicit ’.’ which yields Optional(Strand.Unknown).

  • Plus = Strand(Int8(0))
  • Minus = Strand(Int8(1))
  • Unknown = Strand(Int8(2))
  • value (Int8)

AnyType, Copyable, Deinitable, Equatable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable, Writable

fn def __init__(value: Int8) -> Self

Args:

  • value (Int8)

Returns:

Self

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

Args:

  • self (Self)
  • other (Self)

Returns:

Bool

fn def write_to[w: Writer](self, mut writer: w)

Parameters:

  • w (Writer)

Args:

  • self (Self)
  • writer (w)