Godeps/_workspace/src/gopkg.in/mgo.v2/bson/bson.go
func (raw Raw) Unmarshal(out interface{}) (err error) {
	defer handleErr(&err)
	v := reflect.ValueOf(out)
	switch v.Kind() {
	case reflect.Ptr:
		v = v.Elem()
		fallthrough
	case reflect.Map:
		d := newDecoder(raw.Data)
		good := d.readElemTo(v, raw.Kind)
		if !good {
			return &TypeError{v.Type(), raw.Kind}
		}
	case reflect.Struct:
		return errors.New("Raw Unmarshal can't deal with struct values. Use a pointer.")
	default:
		return errors.New("Raw Unmarshal needs a map or a valid pointer.")
	}
	return nil
}
func (raw Raw) Unmarshal(out interface{}) (err error) {
	defer handleErr(&err)
	v := reflect.ValueOf(out)
	switch v.Kind() {
	case reflect.Ptr:
		v = v.Elem()
		fallthrough
	case reflect.Map:
		d := newDecoder(raw.Data)
		good := d.readElemTo(v, raw.Kind)
		if !good {
			return &TypeError{v.Type(), raw.Kind}
		}
	case reflect.Struct:
		return errors.New("Raw Unmarshal can't deal with struct values. Use a pointer.")
	default:
		return errors.New("Raw Unmarshal needs a map or a valid pointer.")
	}
	return nil
}
func ( raw Raw ) Unmarshal ( out interface { } ) ( err error ) { defer handleErr ( & err ) v := reflect . ValueOf ( out ) switch v . Kind ( ) { case reflect . Ptr : v = v . Elem ( ) fallthrough case reflect . Map : d := newDecoder ( raw . Data ) good := d . readElemTo ( v , raw . Kind ) if ! good { return & TypeError { v . Type ( ) , raw . Kind } } case reflect . Struct : return errors . New ( " " ) default : return errors . New ( " " ) } return nil }
// Unmarshal deserializes raw into the out value.  If the out value type
// is not compatible with raw, a *bson.TypeError is returned.
//
// See the Unmarshal function documentation for more details on the
// unmarshalling process.
Unmarshal deserializes raw into the out value . If the out value type is not compatible with raw a * bson . TypeError is returned . See the Unmarshal function documentation for more details on the unmarshalling process .