11use miette:: Diagnostic ;
22
3- use super :: property:: BinPropertyKind ;
3+ use super :: property:: Kind ;
44
55#[ derive( Debug , thiserror:: Error , Diagnostic ) ]
66pub enum Error {
@@ -11,14 +11,19 @@ pub enum Error {
1111 #[ error( "Invalid '{0}' - got '{1}'" ) ]
1212 InvalidField ( & ' static str , String ) ,
1313 #[ error( "Invalid property kind - {0}" ) ]
14- InvalidPropertyTypePrimitive ( #[ from] num_enum:: TryFromPrimitiveError < BinPropertyKind > ) ,
14+ InvalidPropertyTypePrimitive ( #[ from] num_enum:: TryFromPrimitiveError < Kind > ) ,
1515 #[ error( "Invalid size - expected {0}, got {1} bytes" ) ]
1616 InvalidSize ( u64 , u64 ) ,
1717
1818 #[ error( "Container type {0:?} cannot be nested!" ) ]
19- InvalidNesting ( BinPropertyKind ) ,
19+ InvalidNesting ( Kind ) ,
2020 #[ error( "Invalid map key type {0:?}, only primitive types can be used as keys." ) ]
21- InvalidKeyType ( BinPropertyKind ) ,
21+ InvalidKeyType ( Kind ) ,
22+
23+ #[ error( "Container is empty!" ) ]
24+ EmptyContainer ,
25+ #[ error( "Mismatched types - expected {expected:?}, got {got:?}" ) ]
26+ MismatchedContainerTypes { expected : Kind , got : Kind } ,
2227
2328 #[ error( transparent) ]
2429 ReaderError ( #[ from] ltk_io_ext:: ReaderError ) ,
0 commit comments