Documentation
¶
Overview ¶
Package types defines types and functions to describe Nu types in plugin signatures.
Index ¶
- type RecordDef
- type Type
- func Any() Type
- func Binary() Type
- func Block() Type
- func Bool() Type
- func CellPath() Type
- func Closure() Type
- func Custom(name string) Type
- func Date() Type
- func DecodeMsgpack(dec *msgpack.Decoder) (Type, error)
- func Duration() Type
- func Error() Type
- func Filesize() Type
- func Float() Type
- func Glob() Type
- func Int() Type
- func List(itemType Type) Type
- func Nothing() Type
- func Number() Type
- func OneOf(types ...Type) Type
- func Range() Type
- func Record(fields RecordDef) Type
- func String() Type
- func Table(fields RecordDef) Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RecordDef ¶
RecordDef is the "field list" of the Record and Table Type. The key is field name and value is the type of the field.
type Type ¶
type Type interface {
String() string
EncodeMsgpack(enc *msgpack.Encoder) error
// contains filtered or unexported methods
}
Type describes how Values are represented.
It corresponds to the Rust nu-protocol enum Type.
Constructor functions (ie String, Int,...) are used to create Type instance.
func DecodeMsgpack ¶
DecodeMsgpack decodes Type from decoder. The stream must be in a correct position (in the beginning of a Type value).
Click to show internal directories.
Click to hide internal directories.