func (sr *SingleResult) Decode(v interface{}) error {
	if sr.err != nil {
		return sr.err
	}
	if sr.reg == nil {
		return bson.ErrNilRegistry
	}

	if sr.err = sr.setRdrContents(); sr.err != nil {
		return sr.err
	}
	return bson.UnmarshalWithRegistry(sr.reg, sr.rdr, v)
}
// Decode will unmarshal the document represented by this SingleResult into v. If there was an error from the operation
// that created this SingleResult, that error will be returned. If the operation returned no documents, DecodeBytes will
// return ErrNoDocuments.
//
// If the operation was successful and returned a document, Decode will return any errors from the unmarshalling process
// without any modification. If v is nil or is a typed nil, an error will be returned.
Decode will unmarshal the document represented by this SingleResult into v. If there was an error from the operation
that created this SingleResult, that error will be returned. If the operation returned no documents, DecodeBytes will
return ErrNoDocuments.

If the operation was successful and returned a document, Decode will return any errors from the unmarshalling process
without any modification. If v is nil or is a typed nil, an error will be returned.
// Decode will unmarshal the document represented by this SingleResult into v . If there was an error from the operation // that created this SingleResult that error will be returned . If the operation returned no documents DecodeBytes will // return ErrNoDocuments . // // If the operation was successful and returned a document Decode will return any errors from the unmarshalling process // without any modification . If v is nil or is a typed nil an error will be returned .
func (sr *SingleResult) Decode(v interface{}) error {
	if sr.err != nil {
		return sr.err
	}
	if sr.reg == nil {
		return bson.ErrNilRegistry
	}
	if sr.err = sr.setRdrContents(); sr.err != nil {
		return sr.err
	}
	return bson.UnmarshalWithRegistry(sr.reg, sr.rdr, v)
}
func ( sr * SingleResult ) Decode ( v interface { } ) error { if sr . err != nil { return sr . err } if sr . reg == nil { return bson . ErrNilRegistry } if sr . err = sr . setRdrContents ( ) ; sr . err != nil { return sr . err } return bson . UnmarshalWithRegistry ( sr . reg , sr . rdr , v ) }
Decode will unmarshal the document represented by this SingleResult into v. If there was an error from the operation
that created this SingleResult, that error will be returned.
Decode will unmarshal the document represented by this SingleResult into v . If there was an error from the operation that created this SingleResult that error will be returned .