pub enum Content {
Data(Vec<u8>),
Promise(Rc<dyn Fn() -> ContentFuture>),
File(PathBuf),
FilePromise {
name: String,
produce: Rc<dyn Fn(Box<dyn FileSink>) -> WriteFuture>,
},
}Expand description
One form’s content. A file, given or promised, is keyed by the type of what is in it, and
a reader finds it as URI_LIST.
Variants§
Data(Vec<u8>)
The bytes, given at once.
Promise(Rc<dyn Fn() -> ContentFuture>)
Produced when someone pastes it, each time.
File(PathBuf)
A file the app has, put on the clipboard by its path.
FilePromise
A file that exists only once pasted: its name, and what produces its bytes into the sink
the host hands it. The file is whole when the future resolves Ok; an Err fails the
paste, and the host removes what it wrote.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Content
impl !Send for Content
impl !Sync for Content
impl !UnwindSafe for Content
impl Freeze for Content
impl Unpin for Content
impl UnsafeUnpin for Content
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