pub struct PasteRequest {
pub target: String,
pub slot: Option<Slot>,
pub format: Option<FormatId>,
pub transform: Option<String>,
pub parts: Option<Vec<String>>,
pub if_rev: Option<u64>,
pub dry_run: bool,
pub text: Option<String>,
pub element: Option<String>,
pub no_text: bool,
}Expand description
A paste, as the clipboard.paste step’s arguments.
Fields§
§target: StringThe endpoint pasted into.
slot: Option<Slot>The slot read (the origin’s own by default).
format: Option<FormatId>The format the target should receive.
transform: Option<String>The transform to go through.
parts: Option<Vec<String>>Only these parts of the item.
if_rev: Option<u64>Refused unless the owner is at this revision.
dry_run: boolSay what would be pasted and changed, change nothing.
text: Option<String>What the system clipboard held, when the paste key brought it.
element: Option<String>The element pasted into (a node, a row); the focused one’s when the Edit commands paste.
no_text: boolThe paste key found no text on the system clipboard (it holds files, an image, or nothing): what it holds is read through the system backend, and a paste is refused when the backend reads nothing while the system clipboard no longer holds what the owner wrote there.
Implementations§
Source§impl PasteRequest
impl PasteRequest
pub fn new(target: &str) -> Self
pub fn dry_run(self) -> Self
pub fn format(self, format: FormatId) -> Self
pub fn transform(self, id: &str) -> Self
pub fn parts(self, parts: &[&str]) -> Self
pub fn if_rev(self, rev: u64) -> Self
pub fn slot(self, slot: Slot) -> Self
Trait Implementations§
Source§impl Clone for PasteRequest
impl Clone for PasteRequest
Source§fn clone(&self) -> PasteRequest
fn clone(&self) -> PasteRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PasteRequest
impl Debug for PasteRequest
Source§impl Default for PasteRequest
impl Default for PasteRequest
Source§fn default() -> PasteRequest
fn default() -> PasteRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PasteRequest
impl<'de> Deserialize<'de> for PasteRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PasteRequest
impl PartialEq for PasteRequest
Source§impl Serialize for PasteRequest
impl Serialize for PasteRequest
impl StructuralPartialEq for PasteRequest
Auto Trait Implementations§
impl Freeze for PasteRequest
impl RefUnwindSafe for PasteRequest
impl Send for PasteRequest
impl Sync for PasteRequest
impl Unpin for PasteRequest
impl UnsafeUnpin for PasteRequest
impl UnwindSafe for PasteRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.