assertIsVariableSize function

void assertIsVariableSize(
  1. Object? object
)

Asserts that the given object is variable-size.

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

Implementation

void assertIsVariableSize(Object? object) {
  if (!isVariableSize(object)) {
    throw SolanaError(SolanaErrorCode.codecsExpectedVariableLength);
  }
}