pub enum CaptureTarget {
Window {
window_id: String,
},
Element {
window_id: String,
key: String,
},
}Expand description
What to capture: full window or a single element by view key.
Window ids and keys are opaque strings. Empty strings are retained and will ordinarily fail lookup rather than receiving special treatment.
§Examples
let target = ailloli_ui_winit::CaptureTarget::element("main", "toolbar.save");
assert_eq!(target.window_id(), "main");Variants§
Window
Entire presentation identified by its logical window id.
Element
Bounds-cropped element identified by window id and retained view key.
Implementations§
Source§impl CaptureTarget
Constructors and shared window-id access.
impl CaptureTarget
Constructors and shared window-id access.
Sourcepub fn window(window_id: impl Into<String>) -> Self
pub fn window(window_id: impl Into<String>) -> Self
Creates a full-window target.
§Examples
let target = ailloli_ui_winit::CaptureTarget::window("main");
assert_eq!(target.window_id(), "main");Sourcepub fn element(window_id: impl Into<String>, key: impl Into<String>) -> Self
pub fn element(window_id: impl Into<String>, key: impl Into<String>) -> Self
Creates an element target with an exact retained view key.
§Examples
use ailloli_ui_winit::CaptureTarget;
let target = CaptureTarget::element("main", "editor");
assert!(matches!(target, CaptureTarget::Element { key, .. } if key == "editor"));Trait Implementations§
Source§impl Clone for CaptureTarget
impl Clone for CaptureTarget
Source§fn clone(&self) -> CaptureTarget
fn clone(&self) -> CaptureTarget
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 CaptureTarget
impl Debug for CaptureTarget
Source§impl PartialEq for CaptureTarget
impl PartialEq for CaptureTarget
impl Eq for CaptureTarget
impl StructuralPartialEq for CaptureTarget
Auto Trait Implementations§
impl Freeze for CaptureTarget
impl RefUnwindSafe for CaptureTarget
impl Send for CaptureTarget
impl Sync for CaptureTarget
impl Unpin for CaptureTarget
impl UnwindSafe for CaptureTarget
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§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