Possible scheme fields improvement
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start with the README example using Scheme!, get_field, and set_field_value, then read the scheme and field APIs that define how field references are created and checked. Explore whether compile-time field information can provide a non-optional FieldRef while preventing values from unrelated schemes from being passed. Done means the API addresses both concerns; the issue names no tests, so identify relevant coverage while reading the implementation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I noticed the readme example has a few unwraps that could probably be avoided. For example:
let scheme = Scheme! {
http.method: Bytes,
http.ua: Bytes,
port: Int,
}
.build();
// ...
ctx.set_field_value(scheme.get_field("http.method").unwrap(), "GET")?;
I played around a bit to see if the field information could be returned when defining the scheme. That information could then be used to get a non-optional FieldRef based on the fact we know such fields were defined at compile time. I created a fork to demonstrate the idea: https://github.com/tombailey/wirefilter/pull/1
Just to note, that fork is AI slop. It is not intended as a real patch
And the fork doesn't prevent set_field_value being called with a field from an unrelated scheme
- Ngôn ngữ chính
- Rust
- Star
- 1.2k
- Fork
- 126
- Merge trung bình
- 12 giờ 12 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cloudflare/wirefilter
-
AlwaysListMatcher::match_value always returns false, contradicting its own doc commentCó thể đã có người làm @sean0407 đã nhận 11 ngày trước. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
cloudflare/wirefilter#190 ·
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 32/100
cloudflare/wirefilter#204 · 2 bình luận ·
-
CPrimitiveType (a repr(u8) enum) is received directly by value across the C ABI with no validationĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
cloudflare/wirefilter#196 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
cloudflare/wirefilter#195 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 65/100
cloudflare/wirefilter#194 ·
Tất cả issue của cloudflare/wirefilter
Issue tương tự
-
bug priority: low ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
storytold/photocraft#10370 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:doc bug in progress needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bherbruck/solvecraft#9634 · 2 bình luận · 1 reaction ·
-
inflate: total_in uses plain += on c_ulong (32-bit on Windows), panics in debug for streams > 4 GiBĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
trifectatechfoundation/zlib-rs#570 · 1 bình luận ·
-
bug discord-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
LanternOps/breeze#10755 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
aranya-project/aranya#803 ·