use name_type;
use sendable::Sendable;
#[derive(Clone)]
pub struct GenericSendableType {
name: name_type::NameType,
type_tag: u64,
serialised_contents: Vec<u8>,
}
impl GenericSendableType {
pub fn new(name: name_type::NameType, type_tag: u64, serialised_contents: Vec<u8>) -> GenericSendableType {
GenericSendableType {
name: name,
type_tag: type_tag,
serialised_contents: serialised_contents,
}
}
}
impl Sendable for GenericSendableType {
fn name(&self) -> name_type::NameType {
self.name.clone()
}
fn type_tag(&self) -> u64 {
self.type_tag
}
fn serialised_contents(&self) -> Vec<u8> {
self.serialised_contents.clone()
}
}