Skip to main content

CopyApplied

Struct CopyApplied 

Source
pub struct CopyApplied {
    pub sensitive: bool,
    pub expires: CopyExpiry,
    pub local_only: bool,
}
Expand description

What a clipboard_with shell applied to a copy it made (ADR-0053), read from an ok: true reply with CopyApplied::from_response.

Fields§

§sensitive: bool

A sensitive marker was attached to the copy. Whether anything honours it depends on who reads the clipboard: on Android the IS_SENSITIVE extra hides the preview on 13+ and asks keyboards not to keep it (some honour it); on iOS org.nspasteboard.ConcealedType is honoured only by some Mac clipboard managers, and only if the copy reaches a Mac (local_only off). Never on the web. It is not proof that the text is hidden.

§expires: CopyExpiry

Who removes the copy when its time is up: who would, not when. A huge expires_after is reported like any other.

§local_only: bool

The platform keeps the copy off the user’s other devices (iOS .localOnly). Never on Android or the web.

Implementations§

Source§

impl CopyApplied

Source

pub fn from_response(resp: &PluginResponse) -> Option<Self>

The report in an ok: true reply, or None when there is none to trust: the copy failed, the output is empty (a shell from CLI 0.68 reports nothing), it doesn’t parse, or it names an expiry this core doesn’t know. None means unknown: an app that needs a protected copy treats it as not protected.

Trait Implementations§

Source§

impl Clone for CopyApplied

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for CopyApplied

Source§

impl Debug for CopyApplied

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for CopyApplied

Source§

impl PartialEq for CopyApplied

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CopyApplied

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.