1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use std::ops::Deref; use crate::CowDataChunk; impl Deref for CowDataChunk<'_> { type Target = [u8]; fn deref(&self) -> &Self::Target { match self { Self::Borrowed(chunk) => chunk, Self::Mbuf(chunk) => chunk, Self::Owned(chunk) => chunk, } } }