rkyv_util 0.1.0-alpha.2

Tools for zero-copy deserialization with rkyv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Provides implementations for certain objects in the standard library.
//! This facilitates the use of no-std.

use std::{rc::Rc, sync::Arc};

use crate::owned::StableBytes;

unsafe impl StableBytes for Arc<[u8]> {
    fn bytes(&self) -> &[u8] {
        self.as_ref()
    }
}

unsafe impl StableBytes for Rc<[u8]> {
    fn bytes(&self) -> &[u8] {
        self.as_ref()
    }
}