pub enum LayoutError {
ElementNotFound(ElementId),
ElementAlreadyRegistered(ElementId),
InvalidRegion(String),
LayoutComputation(String),
Focus(String),
EventRouting(String),
MouseCapture(String),
TerminalTooSmall(u16, u16, u16, u16),
}Expand description
Errors that can occur in the layout manager.
Variants§
ElementNotFound(ElementId)
Element with the given ID is not registered.
ElementAlreadyRegistered(ElementId)
Element is already registered.
InvalidRegion(String)
Invalid layout region specification.
LayoutComputation(String)
Layout computation failed due to terminal size constraints.
Focus(String)
Focus operation failed.
EventRouting(String)
Event routing failed.
MouseCapture(String)
Mouse capture error.
TerminalTooSmall(u16, u16, u16, u16)
Terminal size is too small for layout.
Implementations§
Source§impl LayoutError
impl LayoutError
pub fn element_not_found(id: ElementId) -> LayoutError
pub fn element_already_registered(id: ElementId) -> LayoutError
pub fn invalid_region(msg: impl Into<String>) -> LayoutError
pub fn layout_computation(msg: impl Into<String>) -> LayoutError
pub fn focus(msg: impl Into<String>) -> LayoutError
pub fn event_routing(msg: impl Into<String>) -> LayoutError
pub fn mouse_capture(msg: impl Into<String>) -> LayoutError
pub fn terminal_too_small( min_width: u16, min_height: u16, width: u16, height: u16, ) -> LayoutError
Trait Implementations§
Source§impl Debug for LayoutError
impl Debug for LayoutError
Source§impl Display for LayoutError
impl Display for LayoutError
Source§impl Error for LayoutError
impl Error for LayoutError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for LayoutError
impl RefUnwindSafe for LayoutError
impl Send for LayoutError
impl Sync for LayoutError
impl Unpin for LayoutError
impl UnsafeUnpin for LayoutError
impl UnwindSafe for LayoutError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more