shared-vec 0.1.0

Efficient shared container types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::{Counter, String, Vec};
use core::borrow::Borrow;

impl<C: Counter<usize>> Borrow<str> for String<C> {
    #[inline]
    fn borrow(&self) -> &str {
        self
    }
}
impl<C: Counter<usize>, T> Borrow<[T]> for Vec<C, T> {
    #[inline]
    fn borrow(&self) -> &[T] {
        self
    }
}