Code Monkey home page Code Monkey logo

Comments (2)

keeperofdakeys avatar keeperofdakeys commented on July 19, 2024

Hi, thanks for the feedback.

At this point I'm not going to rename the field. This would change the public api, causing unneeded churn for downstream users. I think reordering them should be fine (I'll need to look into this), and I'll update the documentation so it's clearer that it's actually address family.

Regarding ints for the hints field, this is intentional. Different libc implementations offer different socket types, address families etc, so it's hard to offer a single Enum that can be used for every libc. Instead of trying to track every libc implementation it's easier to offer the field as an int, and let the programmer worry about different libc implementations. So this crate worries about safety with regards to pointers and C-isms, while offering getaddrinfo (and friends) as directly as possible.

(There is a way around the above by using generics with Into - https://doc.rust-lang.org/std/convert/trait.Into.html#examples - I might have a look at how easy this is to implement, and if it's compatible with existing calls).

from dns-lookup.

keeperofdakeys avatar keeperofdakeys commented on July 19, 2024

I've pushed some changes to address these concerns.

from dns-lookup.

Related Issues (19)

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.