pub struct CopyOptions {
pub sensitive: bool,
pub this_device_only: bool,
pub expires_after: Option<Duration>,
}Expand description
How a copy is to be treated. Each option names what it is for, and a host whose system lacks it leaves it out, but for the expiry, which a host does itself where the system cannot.
Fields§
§sensitive: boolA password or a code: kept out of previews, clipboard history and sync, as Android’s
EXTRA_IS_SENSITIVE and macOS’s org.nspasteboard.ConcealedType keep it.
this_device_only: boolKept off other devices’ clipboards, as Apple’s localOnly and currentHostOnly keep
it.
expires_after: Option<Duration>Cleared after this long, if still on the clipboard, as iOS’s expirationDate clears it.
Where the system has no expiry of its own (macOS, Windows, Linux, Android), the host keeps
the time while the app runs: a copy whose app quits before its time stays on the clipboard.
Implementations§
Source§impl CopyOptions
impl CopyOptions
Sourcepub const fn new() -> CopyOptions
pub const fn new() -> CopyOptions
A copy treated as any other.
pub const fn sensitive(self, sensitive: bool) -> CopyOptions
pub const fn this_device_only(self, this_device_only: bool) -> CopyOptions
pub const fn expires_after(self, expires_after: Duration) -> CopyOptions
Trait Implementations§
Source§impl Clone for CopyOptions
impl Clone for CopyOptions
impl Copy for CopyOptions
Source§impl Debug for CopyOptions
impl Debug for CopyOptions
Source§impl Default for CopyOptions
impl Default for CopyOptions
impl Eq for CopyOptions
Source§impl PartialEq for CopyOptions
impl PartialEq for CopyOptions
impl StructuralPartialEq for CopyOptions
Auto Trait Implementations§
impl Freeze for CopyOptions
impl RefUnwindSafe for CopyOptions
impl Send for CopyOptions
impl Sync for CopyOptions
impl Unpin for CopyOptions
impl UnsafeUnpin for CopyOptions
impl UnwindSafe for CopyOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.