as<T extends CborObject> method
Implementation
T as<T extends CborObject>([String? name]) {
try {
return this as T;
} catch (_) {
throw ADAPluginException(
"Failed to cast CBOR object${name != null ? ' for "$name"' : ''} as $T",
details: {'expected': '$T', 'type': runtimeType.toString()},
);
}
}