use typedef::TypeDef;
#[derive(Copy)]
pub struct ArgCountMismatch {
pub expected: uint,
pub specified: uint,
}
#[derive(Copy)]
pub struct ArgTypeMismatch {
pub expected_type: TypeDef,
pub argument_index: uint,
}
impl ArgCountMismatch {
pub fn new(expected: uint, specified: uint) -> ArgCountMismatch {
ArgCountMismatch {
expected: expected,
specified: specified,
}
}
}
impl ArgTypeMismatch {
pub fn new(expected_type: TypeDef, argument_index: uint) -> ArgTypeMismatch {
ArgTypeMismatch {
expected_type: expected_type,
argument_index: argument_index,
}
}
}
#[derive(Copy)]
pub enum FactoryErrorKind {
ArgCountMismatch(ArgCountMismatch),
ArgTypeMismatch(ArgTypeMismatch),
}