rustfmt

package
v0.0.0-...-2bc3700 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DisplayVerb = '\U0001f5a5'
	DebugVerb   = '\U0001f41e'

	DisplayString = "%\U0001f5a5"
	DebugString   = "%\U0001f41e"

	PrettyFlag = '#'

	DisplayPrettyString = "%#\U0001f5a5"
	DebugPrettyString   = "%#\U0001f41e"
)

Variables

This section is empty.

Functions

func FormatValue

func FormatValue(f fmt.State, verb rune, val any, fallbackFormat string)

Types

type DebugList

type DebugList struct {
	// contains filtered or unexported fields
}

func NewDebugList

func NewDebugList(entries []any) *DebugList

func (*DebugList) Format

func (d *DebugList) Format(f fmt.State, verb rune)

func (DebugList) SupportsCustomVerb

func (DebugList) SupportsCustomVerb(verb rune) bool

SupportRustFormat implements Formatter.

type DebugMap

type DebugMap[K indexmap.HashEqualer, V any] struct {
	// contains filtered or unexported fields
}

func NewDebugMap

func NewDebugMap[K indexmap.HashEqualer, V any](m indexmap.Map[K, V]) *DebugMap[K, V]

func (*DebugMap[K, V]) Format

func (m *DebugMap[K, V]) Format(f fmt.State, verb rune)

func (*DebugMap[K, V]) SupportsCustomVerb

func (*DebugMap[K, V]) SupportsCustomVerb(verb rune) bool

SupportRustFormat implements Formatter.

type DebugStruct

type DebugStruct struct {
	// contains filtered or unexported fields
}

func NewDebugStruct

func NewDebugStruct(name string) *DebugStruct

func (*DebugStruct) Field

func (s *DebugStruct) Field(name string, value any) *DebugStruct

func (DebugStruct) Format

func (s DebugStruct) Format(f fmt.State, verb rune)

func (DebugStruct) SupportsCustomVerb

func (DebugStruct) SupportsCustomVerb(verb rune) bool

SupportRustFormat implements Formatter.

type Formatter

type Formatter interface {
	fmt.Formatter
	SupportsCustomVerb(verb rune) bool
}

RustFormatter is a marker interface to indicate a type supports FmtDisplayVerb and FmtDebugVerb in fmt.Formatter.

type PadAdapter

type PadAdapter struct {
	// contains filtered or unexported fields
}

func NewPadAdapter

func NewPadAdapter(w io.Writer, onNewline bool) *PadAdapter

func (*PadAdapter) Write

func (a *PadAdapter) Write(p []byte) (n int, err error)

type PadFormatAdapter

type PadFormatAdapter struct {
	// contains filtered or unexported fields
}

func NewPadFormatAdapter

func NewPadFormatAdapter(f fmt.State, onNewline bool) *PadFormatAdapter

func (*PadFormatAdapter) Flag

func (a *PadFormatAdapter) Flag(c int) bool

Flag implements fmt.State.

func (*PadFormatAdapter) Precision

func (a *PadFormatAdapter) Precision() (prec int, ok bool)

Precision implements fmt.State.

func (*PadFormatAdapter) Width

func (a *PadFormatAdapter) Width() (wid int, ok bool)

Width implements fmt.State.

func (*PadFormatAdapter) Write

func (a *PadFormatAdapter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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