Returns the trunk ID this operation affects, if any. Returns `None` for `Create` since the ID is assigned later.
(&self)
| 326 | /// |
| 327 | /// Returns `None` for `Create` since the ID is assigned later. |
| 328 | pub fn trunk_id(&self) -> Option<TrunkId> { |
| 329 | match self { |
| 330 | TrunkOp::Create { .. } => None, |
| 331 | TrunkOp::Delete { trunk } => Some(*trunk), |
| 332 | TrunkOp::Move { trunk, .. } => Some(*trunk), |
| 333 | TrunkOp::Undelete { trunk } => Some(*trunk), |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | /// Returns `true` if this is a create operation. |
| 338 | #[inline] |
no outgoing calls