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};
#[derive(Debug, Clone, Copy)]
pub struct Background<I> {
inner: I,
style: Style,

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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