Add Order::into_parts() method

This commit is contained in:
Dirkjan Ochtman 2024-02-12 15:47:08 +01:00
parent 10ee80b0bb
commit fcb735c5d8
1 changed files with 5 additions and 0 deletions

View File

@ -179,6 +179,11 @@ impl Order {
Ok(&self.state)
}
/// Extract the URL and last known state from the `Order`
pub fn into_parts(self) -> (String, OrderState) {
(self.url, self.state)
}
/// Get the last known state of the order
///
/// Call `refresh()` to get the latest state from the server.