Derive Debug, Clone, Copy for widgets

This commit is contained in:
Joscha 2023-02-18 14:07:03 +01:00
parent f25ce49e77
commit caca3b6ef1
8 changed files with 8 additions and 0 deletions

View file

@ -2,6 +2,7 @@ use async_trait::async_trait;
use crate::{AsyncWidget, Frame, Pos, Size, Style, Widget}; use crate::{AsyncWidget, Frame, Pos, Size, Style, Widget};
#[derive(Debug, Clone, Copy)]
pub struct Background<I> { pub struct Background<I> {
inner: I, inner: I,
style: Style, style: Style,

View file

@ -86,6 +86,7 @@ impl Default for BorderLook {
} }
} }
#[derive(Debug, Clone, Copy)]
pub struct Border<I> { pub struct Border<I> {
inner: I, inner: I,
look: BorderLook, look: BorderLook,

View file

@ -2,6 +2,7 @@ use async_trait::async_trait;
use crate::{AsyncWidget, Frame, Pos, Size, Widget}; use crate::{AsyncWidget, Frame, Pos, Size, Widget};
#[derive(Debug, Clone, Copy)]
pub struct Cursor<I> { pub struct Cursor<I> {
inner: I, inner: I,
at: Pos, at: Pos,

View file

@ -2,6 +2,7 @@ use async_trait::async_trait;
use crate::{AsyncWidget, Frame, Size, Widget}; use crate::{AsyncWidget, Frame, Size, Widget};
#[derive(Debug, Clone, Copy)]
pub enum Either<I1, I2> { pub enum Either<I1, I2> {
First(I1), First(I1),
Second(I2), Second(I2),

View file

@ -2,6 +2,7 @@ use async_trait::async_trait;
use crate::{AsyncWidget, Frame, Pos, Size, Widget}; use crate::{AsyncWidget, Frame, Pos, Size, Widget};
#[derive(Debug, Clone, Copy)]
pub struct Float<I> { pub struct Float<I> {
inner: I, inner: I,
horizontal: Option<f32>, horizontal: Option<f32>,

View file

@ -2,6 +2,7 @@ use async_trait::async_trait;
use crate::{AsyncWidget, Frame, Size, Widget}; use crate::{AsyncWidget, Frame, Size, Widget};
#[derive(Debug, Clone, Copy)]
pub struct Layer<I1, I2> { pub struct Layer<I1, I2> {
below: I1, below: I1,
above: I2, above: I2,

View file

@ -2,6 +2,7 @@ use async_trait::async_trait;
use crate::{AsyncWidget, Frame, Pos, Size, Widget}; use crate::{AsyncWidget, Frame, Pos, Size, Widget};
#[derive(Debug, Clone, Copy)]
pub struct Padding<I> { pub struct Padding<I> {
inner: I, inner: I,
left: u16, left: u16,

View file

@ -2,6 +2,7 @@ use async_trait::async_trait;
use crate::{AsyncWidget, Frame, Pos, Size, Styled, Widget, WidthDb}; use crate::{AsyncWidget, Frame, Pos, Size, Styled, Widget, WidthDb};
#[derive(Debug, Clone)]
pub struct Text { pub struct Text {
styled: Styled, styled: Styled,
wrap: bool, wrap: bool,