BurntSushi / BurntSushi/byteorder

Feature request: Add write_uXX_from to WriteBytesExt trait

Open
#155 4 comments 3 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Rust
Stars
1.1k
Forks
161
PR merge metrics
No merged PRs in 30d

Description

I write some kind of protocol parser and I use next code to read protocol data:
```rust
reader.read_u32_into::(&mut buffer);
```

I would like to use the same logic for writer:
```rust
writer.write_u32_from::(&buffer);
```

Is that already possible? Or it needs implementation?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the WriteBytesExt trait and compare the requested write_u32_from call with the existing read_u32_into method shown in the issue. Determine whether the trait already supports writing a buffer with an endian parameter, then implement the requested write_uXX_from behavior if needed and verify that the corresponding endian-specific writing cases work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.