Add into_parts to ServiceId
This function allows for easy decomposition of the ServiceId struct.
@@ -37,6 +37,11 @@ impl ServiceId {
pub fn service_id(&self) -> &str {
&self.service_id
}
+
+ /// Decompose this ServiceId into a tuple of (<circuit name>, <service id>).
+ pub fn into_parts(self) -> (String, String) {
+ (self.circuit_name, self.service_id)
+ }
}
impl fmt::Display for ServiceId {
