Crates.io | coap-request-implementations |
lib.rs | coap-request-implementations |
version | 0.1.0-alpha.4 |
source | src |
created_at | 2023-11-14 16:53:00.563581 |
updated_at | 2024-01-30 16:57:06.129498 |
description | Implementations of basic CoAP requests |
homepage | |
repository | https://codeberg.org/chrysn/coap-request-implementations |
max_upload_size | |
id | 1035081 |
size | 17,212 |
Simple implementations of a [coap_request::Request]
While the [coap_request] interfaces are geared toward portability, this crate provides implementations of the [coap_request::Request] trait that are easy to set up. They follow a builder pattern:
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;
This crate is in an early experimental stage, do not expect these APIs to persist. (Then again, the crate that needs to be stable is [coap_request], as a single stack can easily be used with request builders from multiple versions of this crate).
License: MIT OR Apache-2.0