mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
implement Default traits
This commit is contained in:
parent
1a0b31e695
commit
9b214b1469
55 changed files with 330 additions and 0 deletions
|
|
@ -15,6 +15,12 @@ pub struct Action {
|
|||
pub update: Rc<Update>,
|
||||
}
|
||||
|
||||
impl Default for Action {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Action {
|
||||
// Constructors
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ pub struct Cancel {
|
|||
pub action: SimpleAction,
|
||||
}
|
||||
|
||||
impl Default for Cancel {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Cancel {
|
||||
// Constructors
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ pub struct Complete {
|
|||
pub action: SimpleAction,
|
||||
}
|
||||
|
||||
impl Default for Complete {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Complete {
|
||||
// Constructors
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ pub struct Update {
|
|||
pub action: SimpleAction,
|
||||
}
|
||||
|
||||
impl Default for Update {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Update {
|
||||
// Constructors
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ pub struct Cancel {
|
|||
pub button: Button,
|
||||
}
|
||||
|
||||
impl Default for Cancel {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Cancel {
|
||||
// Constructors
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ pub struct Open {
|
|||
pub button: Button,
|
||||
}
|
||||
|
||||
impl Default for Open {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Open {
|
||||
// Constructors
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@ pub struct Progress {
|
|||
pub spinner: Spinner,
|
||||
}
|
||||
|
||||
impl Default for Progress {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Progress {
|
||||
// Constructors
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,12 @@ pub struct Status {
|
|||
pub label: Label,
|
||||
}
|
||||
|
||||
impl Default for Status {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Status {
|
||||
// Constructors
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@ pub struct Tag {
|
|||
pub text_tag: TextTag,
|
||||
}
|
||||
|
||||
impl Default for Tag {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Tag {
|
||||
// Constructors
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,12 @@ pub struct Syntax {
|
|||
theme_set: ThemeSet,
|
||||
}
|
||||
|
||||
impl Default for Syntax {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Syntax {
|
||||
// Constructors
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@ pub struct Tag {
|
|||
pub text_tag: TextTag,
|
||||
}
|
||||
|
||||
impl Default for Tag {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Tag {
|
||||
// Constructors
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,12 @@ pub struct Tag {
|
|||
pub plain: TextTag,
|
||||
}
|
||||
|
||||
impl Default for Tag {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Tag {
|
||||
// Construct
|
||||
pub fn new() -> Self {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@ pub struct Reader {
|
|||
widget: Label,
|
||||
}
|
||||
|
||||
impl Default for Reader {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Reader {
|
||||
// Construct
|
||||
pub fn new() -> Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue