 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package rlpstruct implements struct processing for RLP encoding/decoding.
In particular, this package handles all rules around field filtering, struct tags and nil value determination.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TagError ¶
type TagError struct {
	StructType string
	// These are set by this package.
	Field string
	Tag   string
	Err   string
}
    TagError is raised for invalid struct tags.
type Tags ¶
type Tags struct {
	// rlp:"nil" controls whether empty input results in a nil pointer.
	// nilKind is the kind of empty value allowed for the field.
	NilKind NilKind
	NilOK   bool
	// rlp:"optional" allows for a field to be missing in the input list.
	// If this is set, all subsequent fields must also be optional.
	Optional bool
	// rlp:"tail" controls whether this field swallows additional list elements. It can
	// only be set for the last field, which must be of slice type.
	Tail bool
	// rlp:"-" ignores fields.
	Ignored bool
}
    Tags represents struct tags.
type Type ¶
type Type struct {
	Name      string
	Kind      reflect.Kind
	IsEncoder bool  // whether type implements rlp.Encoder
	IsDecoder bool  // whether type implements rlp.Decoder
	Elem      *Type // non-nil for Kind values of Ptr, Slice, Array
}
    Type represents the attributes of a Go type.
func (Type) DefaultNilValue ¶
DefaultNilValue determines whether a nil pointer to t encodes/decodes as an empty string or empty list.
 Click to show internal directories. 
   Click to hide internal directories.