Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoType = errors.New("type line not found")
Functions ¶
func TransformNameGo ¶
TransformNameGo transforms conventional Rust naming to conventional Go naming.
Example: TransformNameGo("post_id") // returns "PostID"
func TransformTypeGo ¶
TransformTypeGo transforms Rust types to Go
Example: TransformTypeGo("Option<Vec<i64>>") // returns "Optional[[]int64]"
Types ¶
type ImplParser ¶
type ImplParser struct {
// contains filtered or unexported fields
}
func NewImpl ¶
func NewImpl(r io.Reader) *ImplParser
func (*ImplParser) Reset ¶
func (i *ImplParser) Reset(r io.Reader)
type RoutesParser ¶
type RoutesParser struct {
// contains filtered or unexported fields
}
func NewRoutes ¶
func NewRoutes(r io.Reader) *RoutesParser
func (*RoutesParser) Parse ¶
func (r *RoutesParser) Parse() ([]Route, error)
func (*RoutesParser) Reset ¶
func (r *RoutesParser) Reset(rd io.Reader)
type StructParser ¶
type StructParser struct { Skip []string TransformName func(string) string TransformType func(string) string // contains filtered or unexported fields }
func NewStruct ¶
func NewStruct(r io.Reader) *StructParser
func (*StructParser) Parse ¶
func (s *StructParser) Parse() ([]Item, error)
func (*StructParser) Reset ¶
func (s *StructParser) Reset(r io.Reader)
Click to show internal directories.
Click to hide internal directories.