4个版本
0.1.0-alpha.4 | 2024年1月30日 |
---|---|
0.1.0-alpha.3 | 2024年1月18日 |
0.1.0-alpha.2 | 2023年11月29日 |
0.1.0-alpha.1 | 2023年11月14日 |
#4 in #request-builder
745 每月下载量
在 coap-message-demos 中使用
17KB
306 代码行
coap-request-implementations
coap_request::Request 的简单实现
尽管 [coap_request] 接口侧重于便携性,但这个crate提供了易于设置的 coap_request::Request trait 实现。它们遵循构建者模式
stack
.to("[2001:db8::1]:5683".parse().unwrap())
.request(
coap_request_implementations::Code::get()
.with_path("/.well-known/core")
.processing_response_payload_through(|p| println!("Data: {:?}", p)),
)
.await;
稳定性
此crate处于早期实验阶段,不要期望这些API会持续存在。然而,需要稳定的crate是 [coap_request],因为单个栈可以轻松地与来自此crate多个版本的请求构建器一起使用)。
许可:MIT OR Apache-2.0
lib.rs
:
coap_request::Request 的简单实现
尽管 [coap_request] 接口侧重于便携性,但这个crate提供了易于设置的 coap_request::Request trait 实现。它们遵循构建者模式
stack
.to("[2001:db8::1]:5683".parse().unwrap())
.request(
coap_request_implementations::Code::get()
.with_path("/.well-known/core")
.processing_response_payload_through(|p| println!("Data: {:?}", p)),
)
.await;
稳定性
此crate处于早期实验阶段,不要期望这些API会持续存在。然而,需要稳定的crate是 [coap_request],因为单个栈可以轻松地与来自此crate多个版本的请求构建器一起使用)。
依赖关系
~1.5MB
~28K SLoC