summaryrefslogtreecommitdiff
path: root/rust/src/rc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/rc.rs')
-rw-r--r--rust/src/rc.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/rust/src/rc.rs b/rust/src/rc.rs
index bc60bf94..a55c46d2 100644
--- a/rust/src/rc.rs
+++ b/rust/src/rc.rs
@@ -197,6 +197,11 @@ impl<P: CoreOwnedArrayProvider> Array<P> {
pub fn len(&self) -> usize {
self.count
}
+
+ pub fn into_raw_parts(self) -> (*mut P::Raw, usize) {
+ let me = mem::ManuallyDrop::new(self);
+ (me.contents, me.count)
+ }
}
impl<'a, P: 'a + CoreArrayWrapper<'a> + CoreOwnedArrayProvider> Array<P> {