Versions in this module Expand all Collapse all v0 deprecated v0.3.2 Nov 6, 2024 v0.3.1 Nov 1, 2024 v0.3.0 Oct 11, 2024 Changes in this version + func DependsOn(node Node, p *Package) bool type TypeDef + func (t *TypeDef) TypeDef() *TypeDef type World + func (w *World) AllInterfaces() iterate.Seq2[string, *Interface] + func (w *World) AllItems() iterate.Seq2[string, WorldItem] + func (w *World) AllTypeDefs() iterate.Seq2[string, *TypeDef] + func (w *World) HasInterface(i *Interface) bool + func (w *World) Match(pattern string) bool v0.2.4 Oct 6, 2024 v0.2.3 Oct 5, 2024 Changes in this version type Resolve + func ParseWIT(buffer []byte) (*Resolve, error) v0.2.2 Oct 4, 2024 v0.2.1 Sep 26, 2024 Changes in this version type Ident + func (id *Ident) WIT(ctx Node, _ string) string + func (id *Ident) WITKind() string type Interface + func (i *Interface) WITPackage() *Package type TypeOwner + WITPackage func() *Package type World + func (w *World) WITPackage() *Package v0.2.0 Sep 5, 2024 Changes in this version + const DocPrefix + const LineLength + const MaxFlatParams + const MaxFlatResults + func Align(ptr, align uintptr) uintptr + func HasBorrow(t TypeDefKind) bool + func HasPointer(t TypeDefKind) bool + func HasResource(t TypeDefKind) bool + func KindOf[K TypeDefKind](t Type) (kind K) + type ABI interface + Align func() uintptr + Flat func() []Type + Size func() uintptr + type Bool struct + func (Bool) Align() uintptr + func (Bool) Flat() []Type + func (Bool) Size() uintptr + func (Bool) WITKind() string + func (p Bool) WIT(_ Node, name string) string + type Borrow struct + Type *TypeDef + func (*Borrow) WITKind() string + func (Borrow) Align() uintptr + func (Borrow) Flat() []Type + func (Borrow) Size() uintptr + func (b *Borrow) WIT(ctx Node, name string) string + type Case struct + Docs Docs + Name string + Type Type + func (*Case) WITKind() string + func (c *Case) DecodeField(dec codec.Decoder, name string) error + func (c *Case) WIT(ctx Node, _ string) string + type Char struct + func (Char) Align() uintptr + func (Char) Flat() []Type + func (Char) Size() uintptr + func (Char) WITKind() string + func (p Char) WIT(_ Node, name string) string + type Constructor struct + Type Type + type Direction int + const Exported + const Imported + func (dir Direction) String() string + type Docs struct + Contents string + func (*Docs) WITKind() string + func (d *Docs) DecodeField(dec codec.Decoder, name string) error + func (d *Docs) WIT(_ Node, _ string) string + type Enum struct + Cases []EnumCase + func (*Enum) WITKind() string + func (e *Enum) Align() uintptr + func (e *Enum) DecodeField(dec codec.Decoder, name string) error + func (e *Enum) Despecialize() TypeDefKind + func (e *Enum) Size() uintptr + func (e *Enum) WIT(ctx Node, name string) string + func (v *Enum) Flat() []Type + type EnumCase struct + Docs Docs + Name string + func (*EnumCase) WITKind() string + func (c *EnumCase) DecodeField(dec codec.Decoder, name string) error + func (c *EnumCase) WIT(ctx Node, _ string) string + type F32 struct + func (F32) Align() uintptr + func (F32) Flat() []Type + func (F32) Size() uintptr + func (F32) WITKind() string + func (p F32) WIT(_ Node, name string) string + type F64 struct + func (F64) Align() uintptr + func (F64) Flat() []Type + func (F64) Size() uintptr + func (F64) WITKind() string + func (p F64) WIT(_ Node, name string) string + type Field struct + Docs Docs + Name string + Type Type + func (*Field) WITKind() string + func (f *Field) DecodeField(dec codec.Decoder, name string) error + func (f *Field) WIT(ctx Node, name string) string + type Flag struct + Docs Docs + Name string + func (*Flag) WITKind() string + func (f *Flag) DecodeField(dec codec.Decoder, name string) error + func (f *Flag) WIT(ctx Node, _ string) string + type Flags struct + Flags []Flag + func (*Flags) WITKind() string + func (f *Flags) Align() uintptr + func (f *Flags) DecodeField(dec codec.Decoder, name string) error + func (f *Flags) Flat() []Type + func (f *Flags) Size() uintptr + func (f *Flags) WIT(ctx Node, name string) string + type Freestanding struct + type Function struct + Docs Docs + Kind FunctionKind + Name string + Params []Param + Results []Param + Stability Stability + func LiftFunction(t Type) *Function + func LowerFunction(t Type) *Function + func (f *Function) BaseName() string + func (f *Function) CoreFunction(op Direction) *Function + func (f *Function) DecodeField(dec codec.Decoder, name string) error + func (f *Function) IsAdmin() bool + func (f *Function) IsConstructor() bool + func (f *Function) IsFreestanding() bool + func (f *Function) IsMethod() bool + func (f *Function) IsStatic() bool + func (f *Function) PostReturn(dir Direction) *Function + func (f *Function) ReturnsBorrow() bool + func (f *Function) ReturnsPointer() bool + func (f *Function) Type() Type + func (f *Function) WIT(ctx Node, name string) string + func (f *Function) WITKind() string + type FunctionKind interface + type Future struct + Type Type + func (*Future) Align() uintptr + func (*Future) Flat() []Type + func (*Future) Size() uintptr + func (*Future) WITKind() string + func (f *Future) WIT(_ Node, name string) string + type Handle interface + type Ident struct + Extension string + Namespace string + Package string + Version *semver.Version + func ParseIdent(s string) (Ident, error) + func (id *Ident) String() string + func (id *Ident) UnversionedString() string + func (id *Ident) Validate() error + func (pn *Ident) DecodeString(s string) error + type Interface struct + Docs Docs + Functions ordered.Map[string, *Function] + Name *string + Package *Package + Stability Stability + TypeDefs ordered.Map[string, *TypeDef] + func (*Interface) WITKind() string + func (i *Interface) AllFunctions() iterate.Seq[*Function] + func (i *Interface) WIT(ctx Node, name string) string + type InterfaceRef struct + Interface *Interface + Stability Stability + func (*InterfaceRef) WITKind() string + func (ref *InterfaceRef) WIT(ctx Node, name string) string + type List struct + Type Type + func (*List) Align() uintptr + func (*List) Size() uintptr + func (*List) WITKind() string + func (l *List) Flat() []Type + func (l *List) WIT(_ Node, name string) string + type Method struct + Type Type + type Node interface + WIT func(ctx Node, name string) string + WITKind func() string + type Option struct + Type Type + func (*Option) WITKind() string + func (o *Option) Align() uintptr + func (o *Option) Despecialize() TypeDefKind + func (o *Option) Flat() []Type + func (o *Option) Size() uintptr + func (o *Option) WIT(_ Node, name string) string + type Own struct + Type *TypeDef + func (*Own) WITKind() string + func (Own) Align() uintptr + func (Own) Flat() []Type + func (Own) Size() uintptr + func (o *Own) WIT(ctx Node, name string) string + type Package struct + Docs Docs + Interfaces ordered.Map[string, *Interface] + Name Ident + Worlds ordered.Map[string, *World] + func (*Package) WITKind() string + func (p *Package) WIT(ctx Node, _ string) string + type Param struct + Name string + Type Type + func (*Param) WITKind() string + func (p *Param) DecodeField(dec codec.Decoder, name string) error + func (p *Param) WIT(_ Node, _ string) string + type Pointer struct + Type Type + func (*Pointer) Align() uintptr + func (*Pointer) Size() uintptr + func (*Pointer) WITKind() string + func (p *Pointer) Flat() []Type + func (p *Pointer) WIT(_ Node, name string) string + type Primitive interface + type Record struct + Fields []Field + func (*Record) WITKind() string + func (r *Record) Align() uintptr + func (r *Record) DecodeField(dec codec.Decoder, name string) error + func (r *Record) Flat() []Type + func (r *Record) Size() uintptr + func (r *Record) WIT(ctx Node, name string) string + type Resolve struct + Interfaces []*Interface + Packages []*Package + TypeDefs []*TypeDef + Worlds []*World + func DecodeJSON(r io.Reader) (*Resolve, error) + func LoadJSON(path string) (*Resolve, error) + func LoadWIT(path string) (*Resolve, error) + func (*Resolve) WITKind() string + func (c *Resolve) DecodeField(dec codec.Decoder, name string) error + func (r *Resolve) AllFunctions() iterate.Seq[*Function] + func (r *Resolve) WIT(_ Node, _ string) string + func (res *Resolve) ResolveCodec(v any) codec.Codec + type Resource struct + func (*Resource) Align() uintptr + func (*Resource) Flat() []Type + func (*Resource) Size() uintptr + func (*Resource) WITKind() string + func (r *Resource) WIT(ctx Node, name string) string + type Result struct + Err Type + OK Type + func (*Result) WITKind() string + func (r *Result) Align() uintptr + func (r *Result) DecodeField(dec codec.Decoder, name string) error + func (r *Result) Despecialize() TypeDefKind + func (r *Result) Flat() []Type + func (r *Result) Size() uintptr + func (r *Result) Types() []Type + func (r *Result) WIT(_ Node, name string) string + type S16 struct + func (S16) Align() uintptr + func (S16) Flat() []Type + func (S16) Size() uintptr + func (S16) WITKind() string + func (p S16) WIT(_ Node, name string) string + type S32 struct + func (S32) Align() uintptr + func (S32) Flat() []Type + func (S32) Size() uintptr + func (S32) WITKind() string + func (p S32) WIT(_ Node, name string) string + type S64 struct + func (S64) Align() uintptr + func (S64) Flat() []Type + func (S64) Size() uintptr + func (S64) WITKind() string + func (p S64) WIT(_ Node, name string) string + type S8 struct + func (S8) Align() uintptr + func (S8) Flat() []Type + func (S8) Size() uintptr + func (S8) WITKind() string + func (p S8) WIT(_ Node, name string) string + type Stability interface + type Stable struct + Deprecated *semver.Version + Since semver.Version + func (*Stable) WITKind() string + func (s *Stable) DecodeField(dec codec.Decoder, name string) error + func (s *Stable) WIT(_ Node, _ string) string + type Static struct + Type Type + type Stream struct + Element Type + End Type + func (*Stream) Align() uintptr + func (*Stream) Flat() []Type + func (*Stream) Size() uintptr + func (*Stream) WITKind() string + func (s *Stream) DecodeField(dec codec.Decoder, name string) error + func (s *Stream) WIT(_ Node, name string) string + type String struct + func (String) Align() uintptr + func (String) Flat() []Type + func (String) Size() uintptr + func (String) WITKind() string + func (p String) WIT(_ Node, name string) string + type Tuple struct + Types []Type + func (*Tuple) WITKind() string + func (t *Tuple) Align() uintptr + func (t *Tuple) DecodeField(dec codec.Decoder, name string) error + func (t *Tuple) Despecialize() TypeDefKind + func (t *Tuple) Flat() []Type + func (t *Tuple) Size() uintptr + func (t *Tuple) Type() Type + func (t *Tuple) WIT(ctx Node, name string) string + type Type interface + TypeName func() string + func Discriminant(n int) Type + func ParseType(s string) (Type, error) + type TypeDef struct + Docs Docs + Kind TypeDefKind + Name *string + Owner TypeOwner + Stability Stability + func PointerTo(t Type) *TypeDef + func (t *TypeDef) Align() uintptr + func (t *TypeDef) Constructor() *Function + func (t *TypeDef) Destructor() *Function + func (t *TypeDef) Flat() []Type + func (t *TypeDef) Methods() []*Function + func (t *TypeDef) Package() *Package + func (t *TypeDef) ResourceDrop() *Function + func (t *TypeDef) ResourceNew() *Function + func (t *TypeDef) ResourceRep() *Function + func (t *TypeDef) Root() *TypeDef + func (t *TypeDef) Size() uintptr + func (t *TypeDef) StaticFunctions() []*Function + func (t *TypeDef) TypeName() string + func (t *TypeDef) WIT(ctx Node, name string) string + func (t *TypeDef) WITKind() string + type TypeDefKind interface + func Despecialize(k TypeDefKind) TypeDefKind + type TypeOwner interface + AllFunctions func() iterate.Seq[*Function] + type U16 struct + func (U16) Align() uintptr + func (U16) Flat() []Type + func (U16) Size() uintptr + func (U16) WITKind() string + func (p U16) WIT(_ Node, name string) string + type U32 struct + func (U32) Align() uintptr + func (U32) Flat() []Type + func (U32) Size() uintptr + func (U32) WITKind() string + func (p U32) WIT(_ Node, name string) string + type U64 struct + func (U64) Align() uintptr + func (U64) Flat() []Type + func (U64) Size() uintptr + func (U64) WITKind() string + func (p U64) WIT(_ Node, name string) string + type U8 struct + func (U8) Align() uintptr + func (U8) Flat() []Type + func (U8) Size() uintptr + func (U8) WITKind() string + func (p U8) WIT(_ Node, name string) string + type Unstable struct + Deprecated *semver.Version + Feature string + func (*Unstable) WITKind() string + func (u *Unstable) DecodeField(dec codec.Decoder, name string) error + func (u *Unstable) WIT(_ Node, _ string) string + type Variant struct + Cases []Case + func (*Variant) WITKind() string + func (v *Variant) Align() uintptr + func (v *Variant) DecodeField(dec codec.Decoder, name string) error + func (v *Variant) Enum() *Enum + func (v *Variant) Flat() []Type + func (v *Variant) Size() uintptr + func (v *Variant) Types() []Type + func (v *Variant) WIT(ctx Node, name string) string + type World struct + Docs Docs + Exports ordered.Map[string, WorldItem] + Imports ordered.Map[string, WorldItem] + Name string + Package *Package + Stability Stability + func (*World) WITKind() string + func (w *World) AllFunctions() iterate.Seq[*Function] + func (w *World) WIT(ctx Node, name string) string + type WorldItem interface