Lines Matching defs:Ref
13 //! These traits are used to bound the `B` parameter of [`Ref`].
29 use crate::Ref;
35 /// [`Ref<[u8]>`](core::cell::Ref) and [`RefMut<[u8]>`](core::cell::RefMut).
152 /// Some `ByteSlice` types (notably, the standard library's [`Ref`] type) convey
154 /// type (`&[u8]`). Some methods in this crate's API (such as [`Ref::into_ref`])
158 /// [`Ref`]: core::cell::Ref
180 /// [`Ref::into_mut`]) are only compatible with `ByteSliceMut` types without
326 unsafe impl ByteSlice for cell::Ref<'_, [u8]> {}
328 // SAFETY: This delegates to stdlib implementation of `Ref::map_split`, which is
332 unsafe impl SplitByteSlice for cell::Ref<'_, [u8]> {
335 cell::Ref::map_split(self, |slice|
417 let slice_ref: cell::Ref<'_, [u8]> = cell::Ref::map(borrow, |a| &a[..]);