use crate::errors::AmfError;
use crate::traits::{Marshall, MarshallLength, Unmarshall};
use std::fmt::Display;
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
pub struct UnsupportedType {}
impl Marshall for UnsupportedType {
fn marshall(&self) -> Result<Vec<u8>, AmfError> {
panic!("unsupported")
}
}
impl MarshallLength for UnsupportedType {
fn marshall_length(&self) -> usize {
panic!("unsupported")
}
}
impl Unmarshall for UnsupportedType {
fn unmarshall(_buf: &[u8]) -> Result<(Self, usize), AmfError> {
panic!("unsupported")
}
}
impl Display for UnsupportedType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "Unsupported type: {}", stringify!(self))
}
}
pub type MovieClipType = UnsupportedType;
pub type RecordsetType = UnsupportedType;
pub type ReferenceType = UnsupportedType;
pub type StrictArrayType = UnsupportedType;
pub type DateType = UnsupportedType;
pub type XmlDocumentType = UnsupportedType;
pub type TypedObjectType = UnsupportedType;