Introduce new iced_selector subcrate and refactor Operation

This commit is contained in:
Héctor Ramón Jiménez 2025-08-23 01:44:17 +02:00
parent 8ca25d627f
commit 63142d34fc
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
29 changed files with 839 additions and 521 deletions

View file

@ -1,5 +1,3 @@
use crate::Selector;
use std::io;
use std::sync::Arc;
@ -7,8 +5,12 @@ use std::sync::Arc;
#[derive(Debug, Clone, thiserror::Error)]
pub enum Error {
/// No matching widget was found for the [`Selector`].
#[error("no matching widget was found for the selector: {0:?}")]
NotFound(Selector),
#[error("no matching widget was found for the selector: {selector}")]
NotFound { selector: String },
#[error("the matching target is not visible: {target:?}")]
NotVisible {
target: Arc<dyn std::fmt::Debug + Send + Sync>,
},
/// An IO operation failed.
#[error("an IO operation failed: {0}")]
IOFailed(Arc<io::Error>),