Documentation ¶
Index ¶
- func UnsafeString(in []byte) string
- type PseudoString
- func (p *PseudoString) AppendJSONBytes(buf io.Writer) (e error)
- func (p *PseudoString) IsNil() bool
- func (p PseudoString) JSONSize() uint32
- func (p PseudoString) MarshalJSON() ([]byte, error)
- func (p PseudoString) String() string
- func (p PseudoString) ToJSONBytes() []byte
- func (p *PseudoString) UnmarshalJSON(in []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnsafeString ¶
UnsafeString returns a mutable "string" by raw casting the given byte slice.
This is primarily intended to do string "casts" without copying the underlying data.
This also means that the caller of this function takes full ownership of the backing byte slice and never passes that slice around while this "string" exists.
Types ¶
type PseudoString ¶
type PseudoString []byte
PseudoString is an unsafe string accessor over a mutable byte array.
This type should _never_ be exposed outside of the internal package of this library.
func (*PseudoString) AppendJSONBytes ¶
func (p *PseudoString) AppendJSONBytes(buf io.Writer) (e error)
func (*PseudoString) IsNil ¶
func (p *PseudoString) IsNil() bool
func (PseudoString) JSONSize ¶
func (p PseudoString) JSONSize() uint32
func (PseudoString) MarshalJSON ¶
func (p PseudoString) MarshalJSON() ([]byte, error)
func (PseudoString) String ¶
func (p PseudoString) String() string
func (PseudoString) ToJSONBytes ¶
func (p PseudoString) ToJSONBytes() []byte
func (*PseudoString) UnmarshalJSON ¶
func (p *PseudoString) UnmarshalJSON(in []byte) error
Click to show internal directories.
Click to hide internal directories.