Trait PrimarySelectionSourceHandler

pub trait PrimarySelectionSourceHandler: Sized {
    // Required methods
    fn send_request(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        source: &ZwpPrimarySelectionSourceV1,
        mime: String,
        write_pipe: WritePipe,
    );
    fn cancelled(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        source: &ZwpPrimarySelectionSourceV1,
    );
}
Available on crate feature wayland and Linux only.
Expand description

Handler trait for PrimarySelectionSource events.

The functions defined in this trait are called as DataSource events are received from the compositor.

Required Methods§

fn send_request( &mut self, conn: &Connection, qh: &QueueHandle<Self>, source: &ZwpPrimarySelectionSourceV1, mime: String, write_pipe: WritePipe, )

The client has requested the data for this source to be sent. Send the data, then close the fd.

fn cancelled( &mut self, conn: &Connection, qh: &QueueHandle<Self>, source: &ZwpPrimarySelectionSourceV1, )

The data source is no longer valid Cleanup & destroy this resource

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§