Skip to main content

NoopClipboard

Struct NoopClipboard 

Source
pub struct NoopClipboard;
Expand description

空实现:剪贴板不可用 / 未初始化时的 fallback(静默无操作)

Trait Implementations§

Source§

impl ClipboardProvider for NoopClipboard

Source§

fn get_text(&mut self) -> Option<String>

从系统剪贴板读纯文本;不可用(无权限/不支持/初始化失败)返回 None
Source§

fn set_text(&mut self, _text: &str) -> bool

向系统剪贴板写纯文本;成功返回 true
Source§

fn get_html(&mut self) -> Option<String>

读取 HTML(通常同时带纯文本 alternative)。
Source§

fn set_html(&mut self, _html: &str, _alt_text: Option<&str>) -> bool

写入 HTML 与可选纯文本 alternative。
Source§

fn get_image(&mut self) -> Option<ClipboardImage>

Source§

fn set_image(&mut self, _image: &ClipboardImage) -> bool

Source§

fn get_file_list(&mut self) -> Option<Vec<PathBuf>>

Source§

fn set_file_list(&mut self, _paths: &[PathBuf]) -> bool

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> 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, 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.