client-api: Allow the DeviceId to turn into a DeviceIdOrAllDevices
This commit is contained in:
parent
d971b668ec
commit
3bdead1cf2
@ -32,6 +32,12 @@ impl Display for DeviceIdOrAllDevices {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<DeviceIdBox> for DeviceIdOrAllDevices {
|
||||||
|
fn from(d: DeviceIdBox) -> Self {
|
||||||
|
DeviceIdOrAllDevices::DeviceId(d)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl TryFrom<&str> for DeviceIdOrAllDevices {
|
impl TryFrom<&str> for DeviceIdOrAllDevices {
|
||||||
type Error = &'static str;
|
type Error = &'static str;
|
||||||
fn try_from(device_id_or_all_devices: &str) -> Result<Self, Self::Error> {
|
fn try_from(device_id_or_all_devices: &str) -> Result<Self, Self::Error> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user