We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b958b0 commit 050e47fCopy full SHA for 050e47f
src/encryptable.rs
@@ -66,7 +66,7 @@ impl CblRef for Encryptable {
66
67
impl From<*mut CBLEncryptable> for Encryptable {
68
fn from(cbl_ref: *mut CBLEncryptable) -> Self {
69
- Self::reference(cbl_ref)
+ Self::take_ownership(cbl_ref)
70
}
71
72
@@ -80,6 +80,11 @@ impl Encryptable {
80
81
82
83
+ /// Takes ownership of the CBL ref, the reference counter is not increased so dropping the instance will free the ref.
84
+ pub(crate) const fn take_ownership(cbl_ref: *mut CBLEncryptable) -> Self {
85
+ Self { cbl_ref }
86
+ }
87
+
88
////////
89
90
/// Creates Encryptable object with null value.
0 commit comments