3 #![feature(generic_associated_types)]
5 use std::marker::PhantomData;
13 impl AsBytes for &str {}
18 type Ref<'a> = &'a str;
21 pub struct Bytes<T: Type> {
22 _marker: PhantomData<T>,
25 impl<T: Type> Bytes<T>
27 for<'a> T::Ref<'a>: AsBytes,
29 pub fn new() -> Self {
37 let _b = Bytes::<Utf8>::new();