implement Default traits

This commit is contained in:
yggverse 2025-01-12 14:08:30 +02:00
parent 1a0b31e695
commit 9b214b1469
55 changed files with 330 additions and 0 deletions

View file

@ -12,6 +12,12 @@ pub struct Action {
pub load: Rc<Load>,
}
impl Default for Action {
fn default() -> Self {
Self::new()
}
}
impl Action {
// Constructors

View file

@ -5,6 +5,12 @@ pub struct Ident {
pub simple_action: SimpleAction,
}
impl Default for Ident {
fn default() -> Self {
Self::new()
}
}
impl Ident {
// Constructors

View file

@ -9,6 +9,12 @@ pub struct Load {
pub simple_action: SimpleAction,
}
impl Default for Load {
fn default() -> Self {
Self::new()
}
}
impl Load {
// Constructors

View file

@ -8,6 +8,12 @@ pub struct Action {
pub update: Rc<Update>,
}
impl Default for Action {
fn default() -> Self {
Self::new()
}
}
impl Action {
// Constructors

View file

@ -5,6 +5,12 @@ pub struct Update {
pub gobject: SimpleAction,
}
impl Default for Update {
fn default() -> Self {
Self::new()
}
}
impl Update {
// Constructors

View file

@ -8,6 +8,12 @@ pub struct Unsupported {
widget: Rc<Widget>,
}
impl Default for Unsupported {
fn default() -> Self {
Self::new()
}
}
impl Unsupported {
// Construct

View file

@ -12,6 +12,12 @@ pub struct Widget {
gobject: AlertDialog,
}
impl Default for Widget {
fn default() -> Self {
Self::new()
}
}
impl Widget {
// Constructors

View file

@ -15,6 +15,12 @@ pub struct Client {
// other clients..
}
impl Default for Client {
fn default() -> Self {
Self::new()
}
}
impl Client {
// Constructors

View file

@ -15,6 +15,12 @@ pub struct Action {
pub update: Rc<Update>,
}
impl Default for Action {
fn default() -> Self {
Self::new()
}
}
impl Action {
// Constructors

View file

@ -11,6 +11,12 @@ pub struct Cancel {
pub action: SimpleAction,
}
impl Default for Cancel {
fn default() -> Self {
Self::new()
}
}
impl Cancel {
// Constructors

View file

@ -11,6 +11,12 @@ pub struct Complete {
pub action: SimpleAction,
}
impl Default for Complete {
fn default() -> Self {
Self::new()
}
}
impl Complete {
// Constructors

View file

@ -11,6 +11,12 @@ pub struct Update {
pub action: SimpleAction,
}
impl Default for Update {
fn default() -> Self {
Self::new()
}
}
impl Update {
// Constructors

View file

@ -11,6 +11,12 @@ pub struct Cancel {
pub button: Button,
}
impl Default for Cancel {
fn default() -> Self {
Self::new()
}
}
impl Cancel {
// Constructors

View file

@ -11,6 +11,12 @@ pub struct Open {
pub button: Button,
}
impl Default for Open {
fn default() -> Self {
Self::new()
}
}
impl Open {
// Constructors

View file

@ -9,6 +9,12 @@ pub struct Progress {
pub spinner: Spinner,
}
impl Default for Progress {
fn default() -> Self {
Self::new()
}
}
impl Progress {
// Constructors

View file

@ -14,6 +14,12 @@ pub struct Status {
pub label: Label,
}
impl Default for Status {
fn default() -> Self {
Self::new()
}
}
impl Status {
// Constructors

View file

@ -6,6 +6,12 @@ pub struct Tag {
pub text_tag: TextTag,
}
impl Default for Tag {
fn default() -> Self {
Self::new()
}
}
impl Tag {
// Constructors

View file

@ -35,6 +35,12 @@ pub struct Syntax {
theme_set: ThemeSet,
}
impl Default for Syntax {
fn default() -> Self {
Self::new()
}
}
impl Syntax {
// Constructors

View file

@ -6,6 +6,12 @@ pub struct Tag {
pub text_tag: TextTag,
}
impl Default for Tag {
fn default() -> Self {
Self::new()
}
}
impl Tag {
// Constructors

View file

@ -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 {

View file

@ -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 {

View file

@ -14,6 +14,12 @@ pub struct Input {
pub widget: Rc<Widget>,
}
impl Default for Input {
fn default() -> Self {
Self::new()
}
}
impl Input {
// Construct
pub fn new() -> Self {

View file

@ -8,6 +8,12 @@ pub struct Counter {
pub widget: Rc<Widget>,
}
impl Default for Counter {
fn default() -> Self {
Self::new()
}
}
impl Counter {
// Construct
pub fn new() -> Self {

View file

@ -4,6 +4,12 @@ pub struct Widget {
pub label: Label,
}
impl Default for Widget {
fn default() -> Self {
Self::new()
}
}
impl Widget {
// Construct
pub fn new() -> Self {

View file

@ -7,6 +7,12 @@ pub struct Widget {
pub clamp: Clamp,
}
impl Default for Widget {
fn default() -> Self {
Self::new()
}
}
impl Widget {
// Construct
pub fn new() -> Self {

View file

@ -20,6 +20,12 @@ pub struct Search {
pub g_box: Box,
}
impl Default for Search {
fn default() -> Self {
Self::new()
}
}
impl Search {
// Constructors

View file

@ -10,6 +10,12 @@ pub struct Input {
pub entry: Entry,
}
impl Default for Input {
fn default() -> Self {
Self::new()
}
}
impl Input {
// Constructors

View file

@ -22,6 +22,12 @@ pub struct Navigation {
model: RefCell<Model<(TextIter, TextIter)>>,
}
impl Default for Navigation {
fn default() -> Self {
Self::new()
}
}
impl Navigation {
// Constructors

View file

@ -4,6 +4,12 @@ pub struct Back {
pub button: Button,
}
impl Default for Back {
fn default() -> Self {
Self::new()
}
}
impl Back {
// Constructors

View file

@ -4,6 +4,12 @@ pub struct Forward {
pub button: Button,
}
impl Default for Forward {
fn default() -> Self {
Self::new()
}
}
impl Forward {
// Constructors

View file

@ -6,6 +6,12 @@ pub struct Result {
pub label: Label,
}
impl Default for Result {
fn default() -> Self {
Self::new()
}
}
impl Result {
// Constructors

View file

@ -6,6 +6,12 @@ pub struct Placeholder {
pub label: Label,
}
impl Default for Placeholder {
fn default() -> Self {
Self::new()
}
}
impl Placeholder {
// Constructors