Skip to content

Commit

Permalink
Add Order::into_parts() method
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Jul 1, 2024
1 parent 10ee80b commit fcb735c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit fcb735c

Please sign in to comment.