Git Product home page Git Product logo

Comments (5)

kashifsoofi avatar kashifsoofi commented on August 11, 2024 1

Sorry spoke too soon, i have begun reading rust lang book to learn rust and i though i can handle this but apparently its a bit advanced for my current rust level.

from lychee.

kashifsoofi avatar kashifsoofi commented on August 11, 2024

Can I help on this.

from lychee.

mre avatar mre commented on August 11, 2024

Sure. It's all yours. Thanks for looking into it. 😊

from lychee.

pawroman avatar pawroman commented on August 11, 2024

I have done some exploration and looks like rust-typed-builder could be an alternative to derive_builder worth considering.

One caveat I see in our case is that not all fields are trivially instantiated (e.g. reqwest::Client requires using a builder). Having a way to initialize it in the generated build method would be ideal, but I'm not sure if any of these libraries have that capability out of the box.

from lychee.

mre avatar mre commented on August 11, 2024

Not sure if it helps, but according to the docs derive_builder has a flag to skip the build() method:

Build method suppression: You can use #[builder(build_fn(skip))] to disable auto-implementation of the build method and provide your own.
Maybe that's all we need?

@kashifsoofi no worries and thanks for the feedback.

from lychee.

Related Issues (20)

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.