Tray

package
v0.2.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrEmptyTray

type ErrEmptyTray struct{}

func NewErrEmptyTray

func NewErrEmptyTray() *ErrEmptyTray

func (*ErrEmptyTray) Error

func (e *ErrEmptyTray) Error() string

type Tray

type Tray[T any] struct {
	// contains filtered or unexported fields
}

func NewTray

func NewTray[T any](tape []T) *Tray[T]

func (*Tray[T]) ArrowEnd

func (t *Tray[T]) ArrowEnd()

func (*Tray[T]) ArrowStart

func (t *Tray[T]) ArrowStart()

func (*Tray[T]) Delete

func (t *Tray[T]) Delete(n int) error

func (*Tray[T]) ExtendTapeOnLeft

func (t *Tray[T]) ExtendTapeOnLeft(elems ...T)

func (*Tray[T]) ExtendTapeOnRight

func (t *Tray[T]) ExtendTapeOnRight(elems ...T)

func (*Tray[T]) Insert

func (t *Tray[T]) Insert(elems ...T)

func (*Tray[T]) MoveLeft

func (t *Tray[T]) MoveLeft(n int) bool

func (*Tray[T]) MoveRight

func (t *Tray[T]) MoveRight(n int) bool

func (*Tray[T]) Read

func (t *Tray[T]) Read() (T, error)

func (*Tray[T]) ShiftLeftOfArrow

func (t *Tray[T]) ShiftLeftOfArrow(n int)

func (*Tray[T]) ShiftRightOfArrow

func (t *Tray[T]) ShiftRightOfArrow(n int)

func (*Tray[T]) Write

func (t *Tray[T]) Write(elem T) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL