// UnmarshalText implements encoding.TextUnmarshaler.
338703
func (n *Node) UnmarshalText(text []byte) error {
	dec, err := ParseV4(string(text))
	if err == nil {
		*n = *dec
	}
	return err
}
455603
func (h *Hash) UnmarshalText(data []byte) error {
	newH, err := HashFromString(string(data))
	if err != nil {
		return err
	}
	*h = newH
	return nil
}
535178
func (b *Bloom) UnmarshalText(input []byte) error {
	return hexutil.UnmarshalFixedText("Bloom", input, b[:])
}
794731
func (t *UnixTime) UnmarshalText(raw []byte) error {
	var unmarshaled time.Time

	if err := unmarshaled.UnmarshalText(raw); err != nil {
		return err
	}

	*t = UnixTime(unmarshaled)
	return nil
}
524063
func (r *Record) UnmarshalText(b []byte) error {
	return r.UnmarshalSAM(nil, b)
}
1206988
func (u *UUID) UnmarshalText(text []byte) error {
	id := make([]byte, base64.StdEncoding.DecodedLen(len(text)))
	length, err := base64.StdEncoding.Decode(id, text)
	if err != nil {
		return err
	}
	if length != 16 {
		return ErrInvalidUUIDLength
	}
	copy((*u)[:], id[:16])
	return nil
}
809990
func (b *Bytes) UnmarshalText(input []byte) error {
	raw, err := checkText(input, true)
	if err != nil {
		return err
	}
	dec := make([]byte, len(raw)/2)
	if _, err = hex.Decode(dec, raw); err != nil {
		err = mapError(err)
	} else {
		*b = dec
	}
	return err
}
1140343
func (r *Recipient) UnmarshalText(text []byte) error {
	s := string(text)
	if s[len(s)-1:] != ">" {
		*r = Recipient{Email: s}
		return nil
	}

	i := strings.Index(s, "<")
	// at least 1 char followed by a space
	if i < 2 {
		return fmt.Errorf("malformed recipient string '%s'", s)
	}
	*r = Recipient{
		Name:  strings.TrimSpace(s[:i]),
		Email: s[i+1 : len(s)-1],
	}

	return nil
}
1274778
func (b *Big) UnmarshalText(input []byte) error {
	raw, err := checkNumberText(input)
	if err != nil {
		return err
	}
	if len(raw) > 64 {
		return ErrBig256Range
	}
	words := make([]big.Word, len(raw)/bigWordNibbles+1)
	end := len(raw)
	for i := range words {
		start := end - bigWordNibbles
		if start < 0 {
			start = 0
		}
		for ri := start; ri < end; ri++ {
			nib := decodeNibble(raw[ri])
			if nib == badNibble {
				return ErrSyntax
			}
			words[i] *= 16
			words[i] += big.Word(nib)
		}
		end = start
	}
	var dec big.Int
	dec.SetBits(words)
	*b = (Big)(dec)
	return nil
}
1300559
func (key *AES128Key) UnmarshalText(data []byte) error {
	parsed, err := ParseAES128Key(string(data))
	if err != nil {
		return err
	}
	*key = AES128Key(parsed)
	return nil
}
1004449
func (l *Level) UnmarshalText(text []byte) (err error) {
	if bytes.Equal(text, levelBytesDebug) {
		*l = LevelDebug
	} else if bytes.Equal(text, levelBytesInfo) {
		*l = LevelInfo
	} else if bytes.Equal(text, levelBytesWarn) {
		*l = LevelWarn
	} else if bytes.Equal(text, levelBytesError) {
		*l = LevelError
	} else if bytes.Equal(text, levelBytesFatal) {
		*l = LevelFatal
	} else {
		err = fmt.Errorf("Uknown level %v", string(text))
	}
	return
}
68383
func (f *Field) UnmarshalText(p []byte) error {
	r, err := Parse(string(p))
	if err != nil {
		return err
	}

	f.reference = r
	return nil
}
998492
func (datr *DataRate) UnmarshalText(data []byte) error {
	parsed, err := ParseDataRate(string(data))
	if err != nil {
		return err
	}
	*datr = *parsed
	return nil
}
311479
func (b *Uint) UnmarshalText(input []byte) error {
	var u64 Uint64
	err := u64.UnmarshalText(input)
	if u64 > Uint64(^uint(0)) || err == ErrUint64Range {
		return ErrUintRange
	} else if err != nil {
		return err
	}
	*b = Uint(u64)
	return nil
}
1239751
func (eui *EUI64) UnmarshalText(data []byte) error {
	parsed, err := ParseEUI64(string(data))
	if err != nil {
		return err
	}
	*eui = EUI64(parsed)
	return nil
}
1246457
func (du *DataURL) UnmarshalText(text []byte) error {
	decoded, err := DecodeString(string(text))
	if err != nil {
		return err
	}
	*du = *decoded
	return nil
}
759295
func (id *ULID) UnmarshalText(v []byte) error {
	return parse(v, false, id)
}