File: src/Xcm/v5/Weight/WeightCodec.sol
WeightCodec
Kind: library
ABI Surface
Errors
error InvalidWeightLength()
Function Surface
function encode(struct Weight weight) internal pure returns (bytes)- Encodes a
Weightstruct into bytes.
- Encodes a
function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)- Returns the number of bytes that a
Weightstruct would occupy when SCALE-encoded.
- Returns the number of bytes that a
function decode(bytes data) internal pure returns (struct Weight, uint256)- Decodes a byte sequence into a
Weightstruct.
- Decodes a byte sequence into a
function decodeAt(bytes data, uint256 offset) internal pure returns (struct Weight, uint256)- Decodes a byte sequence into a
Weightstruct starting at a specific offset.
- Decodes a byte sequence into a