ps_datachunk/cow/implementations/
deref.rs

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