pub struct ClipboardData { /* private fields */ }Expand description
Data fired alongside the copy, cut and paste events.
Clipboard events expose the data being transferred through the system clipboard via a
DataTransfer object — the same abstraction used by drag-and-drop. For a paste, read
the incoming payload with ClipboardData::data_transfer (e.g.
DataTransfer::get_as_text for text, or HasFileData::files for pasted files).
See https://developer.mozilla.org/en-US/docs/Web/API/ClipboardEvent for the underlying DOM event.
Implementations§
Source§impl ClipboardData
impl ClipboardData
Sourcepub fn new(inner: impl HasClipboardData) -> Self
pub fn new(inner: impl HasClipboardData) -> Self
Create a new ClipboardData
Sourcepub fn data_transfer(&self) -> DataTransfer
pub fn data_transfer(&self) -> DataTransfer
The DataTransfer holding the data carried by the clipboard event.
On paste this exposes the data being pasted (read it with
DataTransfer::get_as_text, DataTransfer::get_data or HasFileData::files).
Trait Implementations§
Source§impl Debug for ClipboardData
impl Debug for ClipboardData
Source§impl<'de> Deserialize<'de> for ClipboardData
impl<'de> Deserialize<'de> for ClipboardData
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&PlatformEventData> for ClipboardData
impl From<&PlatformEventData> for ClipboardData
Source§fn from(val: &PlatformEventData) -> Self
fn from(val: &PlatformEventData) -> Self
Converts to this type from the input type.
Source§impl<E: HasClipboardData> From<E> for ClipboardData
impl<E: HasClipboardData> From<E> for ClipboardData
Source§impl HasFileData for ClipboardData
impl HasFileData for ClipboardData
Source§impl PartialEq for ClipboardData
impl PartialEq for ClipboardData
Auto Trait Implementations§
impl !RefUnwindSafe for ClipboardData
impl !Send for ClipboardData
impl !Sync for ClipboardData
impl !UnwindSafe for ClipboardData
impl Freeze for ClipboardData
impl Unpin for ClipboardData
impl UnsafeUnpin for ClipboardData
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.