pub enum CaptureError {
WindowNotFound {
window_id: String,
},
ElementNotFound {
window_id: String,
key: String,
},
DuplicateElementKey {
window_id: String,
key: String,
count: usize,
},
EmptyCrop {
rect: Rect,
},
InvalidFrameBuffer {
width: u32,
height: u32,
len: usize,
},
Encode(String),
Render(String),
}Expand description
Capture failure (missing window/element, crop, encode, render).
§Examples
let error = ailloli_ui_winit::CaptureError::WindowNotFound { window_id: "main".into() };
assert!(error.to_string().contains("main"));Variants§
WindowNotFound
The requested logical window was absent when unknown requests were resolved.
ElementNotFound
No retained element had the requested key.
DuplicateElementKey
More than one retained element had a key that must be unique for capture.
Fields
EmptyCrop
The clamped physical crop rectangle had zero width or height.
Fields
rect: RectRequested physical-pixel rectangle before clamp/rounding.
InvalidFrameBuffer
RGBA storage length was not exactly width * height * 4 bytes.
Fields
Encode(String)
PNG encoding failed with the renderer’s diagnostic message.
Render(String)
Rendering or GPU readback failed with the renderer’s diagnostic message.
Trait Implementations§
Source§impl Clone for CaptureError
impl Clone for CaptureError
Source§fn clone(&self) -> CaptureError
fn clone(&self) -> CaptureError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CaptureError
impl Debug for CaptureError
Source§impl Display for CaptureError
Formats stable category text plus identifying values.
impl Display for CaptureError
Formats stable category text plus identifying values.
Source§impl Error for CaptureError
Marks capture failures as standard errors without a chained source.
impl Error for CaptureError
Marks capture failures as standard errors without a chained source.
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<RendererError> for CaptureError
Converts renderer failures into the string-carrying render category.
impl From<RendererError> for CaptureError
Converts renderer failures into the string-carrying render category.
Source§impl PartialEq for CaptureError
impl PartialEq for CaptureError
impl StructuralPartialEq for CaptureError
Auto Trait Implementations§
impl Freeze for CaptureError
impl RefUnwindSafe for CaptureError
impl Send for CaptureError
impl Sync for CaptureError
impl Unpin for CaptureError
impl UnwindSafe for CaptureError
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> 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>
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>
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)
&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)
&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>
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>
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