pub struct LocalPusher { /* private fields */ }Expand description
Encrypt + push + local write-through for clips originating on this device.
One per active relay. Cheap to clone (Arc inside) so it can be shared by
the clipboard polling loop and any other producer (e.g., a manual paste
command).
Implementations§
Source§impl LocalPusher
impl LocalPusher
pub fn new( store: Arc<Store>, client: Arc<RestClient>, enc_key: Option<[u8; 32]>, ) -> Self
Sourcepub async fn push_text(
&self,
raw: Vec<u8>,
source: &str,
label: &str,
) -> Result<String, IngestError>
pub async fn push_text( &self, raw: Vec<u8>, source: &str, label: &str, ) -> Result<String, IngestError>
Encrypt + push a text clip, then write to the local store using the relay-assigned ID. Returns the assigned clip ID.
Sourcepub async fn push_image_png(
&self,
raw_png: Vec<u8>,
source: &str,
label: &str,
) -> Result<String, IngestError>
pub async fn push_image_png( &self, raw_png: Vec<u8>, source: &str, label: &str, ) -> Result<String, IngestError>
Encrypt + push a PNG image, then write to the local store using the relay-assigned ID. Returns the assigned clip ID.
Trait Implementations§
Source§impl Clone for LocalPusher
impl Clone for LocalPusher
Source§fn clone(&self) -> LocalPusher
fn clone(&self) -> LocalPusher
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LocalPusher
impl !RefUnwindSafe for LocalPusher
impl Send for LocalPusher
impl Sync for LocalPusher
impl Unpin for LocalPusher
impl UnsafeUnpin for LocalPusher
impl !UnwindSafe for LocalPusher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more