mirror of
https://github.com/bspeice/kaitai_rust
synced 2025-07-01 13:56:13 -04:00
Add Default
as a required trait
I could make KStruct require `fn new`, but what I really want already exists.
This commit is contained in:
@ -14,7 +14,7 @@ pub enum KError<'a> {
|
|||||||
}
|
}
|
||||||
pub type KResult<'a, T> = Result<T, KError<'a>>;
|
pub type KResult<'a, T> = Result<T, KError<'a>>;
|
||||||
|
|
||||||
pub trait KStruct<'a> {
|
pub trait KStruct<'a>: Default {
|
||||||
type Parent: KStruct<'a>;
|
type Parent: KStruct<'a>;
|
||||||
type Root: KStruct<'a>;
|
type Root: KStruct<'a>;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user