#[non_exhaustive]pub enum Request<'a> {
Destroy,
AttachBuffer {
buffer: WlBuffer,
},
DamageBuffer {
x: i32,
y: i32,
width: i32,
height: i32,
},
Capture,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Destroy
destroy this object
Destroys the session. This request can be sent at any time by the client.
This is a destructor, once sent this object cannot be used any longer.
AttachBuffer
attach buffer to session
Attach a buffer to the session.
The wl_buffer.release request is unused.
This request must not be sent after capture, or else the already_captured protocol error is raised.
DamageBuffer
damage buffer
Apply damage to the buffer which is to be captured next. This request may be sent multiple times to describe a region.
The client indicates the accumulated damage since this wl_buffer was last captured. During capture, the compositor will update the buffer with at least the union of the region passed by the client and the region advertised by zcosmic_screencopy_frame_v2.damage.
When a wl_buffer is captured for the first time, or when the client doesn’t track damage, the client must damage the whole buffer.
This is for optimisation purposes. The compositor may use this information to reduce copying.
These coordinates originate from the upper left corner of the buffer.
If x or y are strictly negative, or if width or height are negative or zero, the invalid_buffer_damage protocol error is raised.
This request must not be sent after capture, or else the already_captured protocol error is raised.
Fields
Capture
capture a frame
Capture a frame.
Unless this is the first successful captured frame performed in this session, the compositor may wait an indefinite amount of time for the source content to change before performing the copy.
This request may only be sent once, or else the already_captured protocol error is raised. A buffer must be attached before this request is sent, or else the no_buffer protocol error is raised.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Request<'a>
impl<'a> !RefUnwindSafe for Request<'a>
impl<'a> Send for Request<'a>
impl<'a> Sync for Request<'a>
impl<'a> Unpin for Request<'a>
impl<'a> !UnwindSafe for Request<'a>
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.