This commit is contained in:
parent
8f6dd9309d
commit
19d752c089
3 changed files with 137 additions and 45 deletions
|
@ -1,4 +1,5 @@
|
|||
use std::borrow::Cow;
|
||||
use std::cmp::Ordering;
|
||||
use std::ops::Deref;
|
||||
|
||||
use cosmic::iced::clipboard::mime::{AllowedMimeTypes, AsMimeTypes};
|
||||
|
@ -24,6 +25,20 @@ pub struct ServiceItem {
|
|||
// pub item: Box<dyn ServiceTrait>,
|
||||
}
|
||||
|
||||
impl Eq for ServiceItem {}
|
||||
|
||||
impl PartialOrd for ServiceItem {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||
self.id.partial_cmp(&other.id)
|
||||
}
|
||||
}
|
||||
|
||||
impl Ord for ServiceItem {
|
||||
fn cmp(&self, other: &Self) -> Ordering {
|
||||
self.id.cmp(&other.id)
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<(Vec<u8>, String)> for ServiceItem {
|
||||
type Error = miette::Error;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue