| 1186 | } |
| 1187 | |
| 1188 | std::optional<std::reference_wrapper<const TransportStatusDetail>> |
| 1189 | TransportStatusDetail::Unwrap(const Status& status) { |
| 1190 | std::shared_ptr<StatusDetail> detail = status.detail(); |
| 1191 | if (!detail) return std::nullopt; |
| 1192 | if (detail->type_id() != kTypeId) return std::nullopt; |
| 1193 | return std::cref(arrow::internal::checked_cast<const TransportStatusDetail&>(*detail)); |
| 1194 | } |
| 1195 | |
| 1196 | //------------------------------------------------------------ |
| 1197 | // Async types |