Giter Site home page Giter Site logo

serde-inline-default's Introduction

>_About.TechStack()

Octocat

Rust Go Python Bash HTML CSS Typescript Svelte Tailwind Postgres Docker Kubernetes Linux (the cute penguin :3) Jetbrains IDEs Git GitHub

>_About.Me()

  • I'm a german student who loves open source development, to automate and simplify things. Anime is also pretty neat stuff.
  • My main development target is Linux although most of the stuff would probably run on Windows as well but Linux has simply many advantages over windows that I cannot understand why someone doesn't want to use it (at least in dual-boot).
  • See my private Gitea instance for more repos which are too irrelevant to host them on GitHub (and it's working as a backup server if GitHub goes down or something like this).

Discord Contact Mastodon Twitter Reddit MyAnimeList Website

Support me on Ko-fi

>_About.Stats()

serde-inline-default's People

Contributors

bytedream avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

serde-inline-default's Issues

default no match

  
  use serde_inline_default::serde_inline_default;
  

  #[derive(Deserialize, Default, PartialEq, Eq, Debug)]
  #[serde_inline_default]
  struct Test {
      #[serde_inline_default("hello".to_string())]
      pub value: String,
  }
  #[test]
  fn test_case() {
      assert_eq!(
          Test {
              value: "hello".to_string()
          },
          Test::default()
      );
  }

test wrong:

 left: Test { value: "hello" }
 right: Test { value: "" }

Add default values to doc

Hi!

Your crate makes really sense, especially as the serde PR is still open. serde-rs/serde#368

Could you make the macro add a field documentation that informs about the default value?

Thanks

What about Strings and &str?

It seems this doesn't work for &str and String, try using a conversion method but nothing parses correctly (into, to_string, to_owned, String::from)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.