Provide std::net::IpAddr#octets
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 1.7k
- Avg merge
- 16h 14m
- Merged PRs (30d)
- 1
Description
Both Ipv4Addr and Ipv6Addr provide the octets() method. The union type should provide it too.
fn octets(&self) -> std::vec<u8>
The downside of this API is that it "requires" an allocation since the size is not known. Alternative interfaces would be to return/take a buffer large enough for either v4 or v6.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names std::net::IpAddr and the existing Ipv4Addr and Ipv6Addr octets() methods; start by comparing those APIs. Resolve whether the union method should return an allocated Vec or use a caller-provided buffer, then define the interface and its test coverage. Done means the API design is settled and the behavior is tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100