Mojo struct
ContiguousSlice
struct ContiguousSlice
Represents a slice expression without a stride.
This type is used to support different behavior for strided vs unstrided slicing.
Fields
- start (
Optional[Int]): The starting index of the slice. - end (
Optional[Int]): The end index of the slice.
Implemented traits
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
Writable
Methods
__init__
__init__(out self, start: Optional[Int], end: Optional[Int], stride: NoneType, __slice_literal__: Tuple[] = Tuple())
Construct slice given the start and end values.
Args:
write_to
write_to(self, mut writer: T)
Write ContiguousSlice string representation to a Writer.
Args:
- writer (
T): The object to write to.
write_repr_to
write_repr_to(self, mut writer: T)
Write ContiguousSlice debug representation to a Writer.
Args:
- writer (
T): The object to write to.
indices
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!