use std::marker::{PhantomData, PhantomPinned};
use super::Encode;
impl<T> Encode for PhantomData<T> {
type Context = ();
#[inline]
fn encode<E: super::EntropyCoder>(&self, _encoder: &mut E, _ctx: &mut Self::Context) {
}
#[inline]
fn decode<D: super::EntropyDecoder>(
_decoder: &mut D,
_ctx: &mut Self::Context,
) -> Result<Self, std::io::Error> {
Ok(PhantomData)
}
}
impl Encode for PhantomPinned {
type Context = ();
#[inline]
fn encode<E: super::EntropyCoder>(&self, _encoder: &mut E, _ctx: &mut Self::Context) {
}
#[inline]
fn decode<D: super::EntropyDecoder>(
_decoder: &mut D,
_ctx: &mut Self::Context,
) -> Result<Self, std::io::Error> {
Ok(PhantomPinned)
}
}