Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Default trait #31

Open
LimpidCrypto opened this issue Sep 2, 2022 · 0 comments
Open

Implement Default trait #31

LimpidCrypto opened this issue Sep 2, 2022 · 0 comments
Labels
enhancement New feature or request not time dependent It does not matter when this issue gets resolved XRPL Grants This issue is planned to get resoled as part of the XRPL Grants program (within 8 months)
Milestone

Comments

@LimpidCrypto
Copy link
Collaborator

Implement the Default for any struct it makes sense. The following example shows how much it makes it easier to define a struct:

let request = AccountInfo {
    account: "r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W",
    ..Default::default()
};

Instead of having to define all fields for AccountInfo the user can just define the account and leave the rest to ..Default::default().

@LimpidCrypto LimpidCrypto changed the title Implement Default Implement Default trait Sep 2, 2022
@LimpidCrypto LimpidCrypto added this to the Others milestone Sep 2, 2022
@LimpidCrypto LimpidCrypto added enhancement New feature or request not time dependent It does not matter when this issue gets resolved XRPL Grants This issue is planned to get resoled as part of the XRPL Grants program (within 8 months) labels Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request not time dependent It does not matter when this issue gets resolved XRPL Grants This issue is planned to get resoled as part of the XRPL Grants program (within 8 months)
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant