pub struct ExtDataControlOfferV1 { /* private fields */ }ext-data-control-v1 only.Expand description
offer to transfer data
A ext_data_control_offer represents a piece of data offered for transfer by another client (the source client). The offer describes the different MIME types that the data can be converted to and provides the mechanism for transferring the data directly from the source client.
See Event for the list of possible events.
Implementations§
Source§impl ExtDataControlOfferV1
impl ExtDataControlOfferV1
Sourcepub fn receive<D>(
self,
conn: &mut Connection<D>,
mime_type: CString,
fd: OwnedFd,
)
pub fn receive<D>( self, conn: &mut Connection<D>, mime_type: CString, fd: OwnedFd, )
request that the data is transferred
To transfer the offered data, the client issues this request and indicates the MIME type it wants to receive. The transfer happens through the passed file descriptor (typically created with the pipe system call). The source client writes the data in the MIME type representation requested and then closes the file descriptor.
The receiving client reads from the read end of the pipe until EOF and then closes its end, at which point the transfer is complete.
This request may happen multiple times for different MIME types.
Since version 1.
Sourcepub fn destroy<D>(self, conn: &mut Connection<D>)
pub fn destroy<D>(self, conn: &mut Connection<D>)
destroy this offer
Destroys the data offer object.
Since version 1.
Trait Implementations§
Source§impl Borrow<ObjectId> for ExtDataControlOfferV1
impl Borrow<ObjectId> for ExtDataControlOfferV1
Source§impl Clone for ExtDataControlOfferV1
impl Clone for ExtDataControlOfferV1
Source§fn clone(&self) -> ExtDataControlOfferV1
fn clone(&self) -> ExtDataControlOfferV1
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more