func (t *Tools) SetBSON(raw bson.Raw) error {
	if raw.Kind == 10 {
		// Preserve the nil value in that case.
		return bson.SetZero
	}
	var doc toolsDoc
	if err := raw.Unmarshal(&doc); err != nil {
		return err
	}
	t.Version = doc.Version
	t.URL = doc.URL
	t.Size = doc.Size
	t.SHA256 = doc.SHA256
	return nil
}
// SetBSON updates the internal members with the data stored in the bson.Raw
// parameter.
SetBSON updates the internal members with the data stored in the bson.Raw
parameter.
// SetBSON updates the internal members with the data stored in the bson . Raw // parameter .
func (t *Tools) SetBSON(raw bson.Raw) error {
	if raw.Kind == 10 {
		return bson.SetZero
	}
	var doc toolsDoc
	if err := raw.Unmarshal(&doc); err != nil {
		return err
	}
	t.Version = doc.Version
	t.URL = doc.URL
	t.Size = doc.Size
	t.SHA256 = doc.SHA256
	return nil
}
func ( t * Tools ) SetBSON ( raw bson . Raw ) error { if raw . Kind == 10 { return bson . SetZero } var doc toolsDoc if err := raw . Unmarshal ( & doc ) ; err != nil { return err } t . Version = doc . Version t . URL = doc . URL t . Size = doc . Size t . SHA256 = doc . SHA256 return nil }
SetBSON updates the internal members with the data stored in the bson.Raw
parameter.
SetBSON updates the internal members with the data stored in the bson . Raw parameter .
// Preserve the nil value in that case.