struct deamon
This commit is contained in:
@ -0,0 +1,30 @@
|
||||
use std::time::SystemTime;
|
||||
|
||||
pub struct ClipboardEntry {
|
||||
pub content: ClipboardData,
|
||||
pub timestamp: SystemTime,
|
||||
}
|
||||
|
||||
pub enum ClipboardData {
|
||||
Text(String),
|
||||
Image(Vec<u8>), // png storage
|
||||
}
|
||||
|
||||
impl ClipboardData {
|
||||
fn is_text(&self) -> bool {
|
||||
match self {
|
||||
ClipboardData::Text(_) => true,
|
||||
ClipboardData::Image(_) => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn is_image(&self) -> bool {
|
||||
!self.is_text()
|
||||
}
|
||||
}
|
||||
|
||||
impl ClipboardEntry {
|
||||
fn new() -> ClipboardData {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user