use std::fmt::Debug;
use typed_record::TypedRecord;
use self::metadata::{KContentRange, RepresentationMetadata};
pub mod metadata;
#[cfg(feature = "impl-representation")]
pub mod impl_;
pub trait Representation: Debug {
type Data;
fn data(&self) -> &Self::Data;
fn metadata(&self) -> &RepresentationMetadata;
fn into_parts(self) -> (Self::Data, RepresentationMetadata);
}
pub trait RepresentationExt: Representation {
#[inline]
fn is_complete(&self) -> bool {
self.metadata().get_rv::<KContentRange>().is_none()
}
}
impl<R: Representation> RepresentationExt for R {}