bloqade.lanes.bytecode.encoding.KirinRustWrapper
← Module overview
class
classKirinRustWrapper¶source
bloqade.lanes.bytecode.encoding.KirinRustWrapper
Bases: RustWrapper[R], ir.Data
:class:`RustWrapper` that also satisfies Kirin's ``ir.Data`` contract.
class KirinRustWrapperUse this base for Rust types that appear as IR attributes (for example address types). Subclasses inherit:
from_inner— runs__post_init__so the Kirintypeattribute is initialised on wrappers built from existing Rust objects.unwrap— returnsself._inner(the Rust object), which is the naturalTforir.Data[T].encode— delegates to the Rust object’sencodemethod (most address types implement it). Override if the Rust type does not.print_impl— prints the encoded address as a hex literal, matching the legacyEncoderformatting.
Subclasses must still define __init__ to construct self._inner
and call self.__post_init__().