func (c *Context) Finish() (bsoncore.Document, error) {
	docBinary := newBinary() // out param for mongocrypt_ctx_finalize to fill in resulting document
	defer docBinary.close()

	if ok := C.mongocrypt_ctx_finalize(c.wrapped, docBinary.wrapped); !ok {
		return nil, c.createErrorFromStatus()
	}
	return docBinary.toBytes(), nil
}
// Finish performs the final operations for the context and returns the resulting document.
Finish performs the final operations for the context and returns the resulting document.
// Finish performs the final operations for the context and returns the resulting document .
func (c *Context) Finish() (bsoncore.Document, error) {
	docBinary := newBinary() 
	defer docBinary.close()
	if ok := C.mongocrypt_ctx_finalize(c.wrapped, docBinary.wrapped); !ok {
		return nil, c.createErrorFromStatus()
	}
	return docBinary.toBytes(), nil
}
func ( c * Context ) Finish ( ) ( bsoncore . Document , error ) { docBinary := newBinary ( ) defer docBinary . close ( ) if ok := C . mongocrypt_ctx_finalize ( c . wrapped , docBinary . wrapped ) ; ! ok { return nil , c . createErrorFromStatus ( ) } return docBinary . toBytes ( ) , nil }
Finish performs the final operations for the context and returns the resulting document.
Finish performs the final operations for the context and returns the resulting document .
// out param for mongocrypt_ctx_finalize to fill in resulting document