destructureSelf method

void destructureSelf()

Implementation

void destructureSelf() {
  final parts = this._api._destructureRelationTargetType(this._box.borrow());
  switch (parts.tag) {
    case 0:
      this._tag = RelationTargetTypeTag.Unknown;

      break;
    case 1:
      this._tag = RelationTargetTypeTag.ChatRoom;

      break;
    case 2:
      this._tag = RelationTargetTypeTag.Space;

      break;
    case 3:
      this._tag = RelationTargetTypeTag.ActerSpace;

      break;
    default:
      throw new StateError(
          "Destructuring enum gave back an invalid tag: ${parts.tag}");
  }
}