@@ -144,6 +144,9 @@ def serialize(self) -> bytes:
144144 def from_bytes (cls , value : bytes , / ) -> typing .Self :
145145 return deserialize_from_bytes (cls , value )
146146
147+ def validate (self ) -> None :
148+ pass
149+
147150
148151class _FixedArrayMeta (type , typing .Generic [_TArrayItem , _TArrayLength ]):
149152 __concrete__ : typing .ClassVar [dict [tuple [type , type ], type ]] = {}
@@ -255,6 +258,9 @@ def serialize(self) -> bytes:
255258 def from_bytes (cls , value : bytes , / ) -> typing .Self :
256259 return deserialize_from_bytes (cls , value )
257260
261+ def validate (self ) -> None :
262+ pass
263+
258264
259265class _ImmutableArrayMeta (type ):
260266 __concrete__ : typing .ClassVar [dict [type , type ]] = {}
@@ -362,6 +368,9 @@ def serialize(self) -> bytes:
362368 def from_bytes (cls , value : bytes , / ) -> typing .Self :
363369 return deserialize_from_bytes (cls , value )
364370
371+ def validate (self ) -> None :
372+ pass
373+
365374
366375class ReferenceArray (Reversible [_TArrayItem ]):
367376 def __init__ (self , values : Iterable [_TArrayItem ] = ()):
@@ -510,6 +519,9 @@ def serialize(self) -> bytes:
510519 def from_bytes (cls , value : bytes , / ) -> typing .Self :
511520 return deserialize_from_bytes (cls , value )
512521
522+ def validate (self ) -> None :
523+ pass
524+
513525
514526@typing .dataclass_transform ()
515527class Struct (Serializable , MutableBytes ):
@@ -558,6 +570,9 @@ def from_bytes(cls, value: bytes, /) -> typing.Self:
558570 def _update_backing_value (self ) -> None :
559571 self ._value = serialize_to_bytes (self )
560572
573+ def validate (self ) -> None :
574+ pass
575+
561576
562577def zero_bytes (typ : type [_T ]) -> _T :
563578 # Get the static size of the type
0 commit comments