assertIsFixedSize function

void assertIsFixedSize(
  1. Object? object
)

Asserts that the given object is fixed-size.

Throws a SolanaError with code SolanaErrorCode.codecsExpectedFixedLength if it is not.

Implementation

void assertIsFixedSize(Object? object) {
  if (!isFixedSize(object)) {
    throw SolanaError(SolanaErrorCode.codecsExpectedFixedLength);
  }
}