pub struct NativeOverlayTarget {
pub logical_rect: NativeOverlayRect,
pub output_name: Option<String>,
}Expand description
Output selected by the portal/compositor logical desktop rectangle.
The rectangle is authoritative. An optional output name only narrows an otherwise exact rectangle match and never substitutes for its geometry.
§Examples
use ailloli_ui_winit::native_overlay::{NativeOverlayRect, NativeOverlayTarget};
let target = NativeOverlayTarget::new(NativeOverlayRect::new(0.0, 0.0, 1920.0, 1080.0))
.output_name("DP-1");
assert_eq!(target.output_name.as_deref(), Some("DP-1"));Fields§
§logical_rect: NativeOverlayRectExact logical desktop rectangle supplied by the capture/portal workflow.
output_name: Option<String>Optional stable output name used as an additional, never substitute, discriminator.
Implementations§
Source§impl NativeOverlayTarget
Exact-geometry target construction and optional name discrimination.
impl NativeOverlayTarget
Exact-geometry target construction and optional name discrimination.
Sourcepub const fn new(logical_rect: NativeOverlayRect) -> Self
pub const fn new(logical_rect: NativeOverlayRect) -> Self
Creates an unnamed target for the exact logical rectangle.
§Examples
use ailloli_ui_winit::native_overlay::{NativeOverlayRect, NativeOverlayTarget};
let target = NativeOverlayTarget::new(NativeOverlayRect::new(0.0, 0.0, 800.0, 600.0));
assert!(target.output_name.is_none());Sourcepub fn output_name(self, name: impl Into<String>) -> Self
pub fn output_name(self, name: impl Into<String>) -> Self
Adds a stable output-name discriminator.
An empty string is retained as an exact name and will generally produce
NativeOverlayError::OutputMatchMissing rather than being treated as absent.
§Examples
use ailloli_ui_winit::native_overlay::{NativeOverlayRect, NativeOverlayTarget};
let target = NativeOverlayTarget::new(NativeOverlayRect::new(0.0, 0.0, 1.0, 1.0))
.output_name("HDMI-A-1");
assert_eq!(target.output_name.as_deref(), Some("HDMI-A-1"));Trait Implementations§
Source§impl Clone for NativeOverlayTarget
impl Clone for NativeOverlayTarget
Source§fn clone(&self) -> NativeOverlayTarget
fn clone(&self) -> NativeOverlayTarget
Returns a copy 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 NativeOverlayTarget
impl Debug for NativeOverlayTarget
Source§impl PartialEq for NativeOverlayTarget
impl PartialEq for NativeOverlayTarget
impl StructuralPartialEq for NativeOverlayTarget
Auto Trait Implementations§
impl Freeze for NativeOverlayTarget
impl RefUnwindSafe for NativeOverlayTarget
impl Send for NativeOverlayTarget
impl Sync for NativeOverlayTarget
impl Unpin for NativeOverlayTarget
impl UnwindSafe for NativeOverlayTarget
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>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.
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