#coap #request-builder #iot #builder-pattern #no-alloc #setup

no-std coap-request-implementations

Implementations of basic CoAP requests

4 releases

0.1.0-alpha.4 Jan 30, 2024
0.1.0-alpha.3 Jan 18, 2024
0.1.0-alpha.2 Nov 29, 2023
0.1.0-alpha.1 Nov 14, 2023

#4 in #request-builder

Download history 17/week @ 2024-04-02 12/week @ 2024-04-09 50/week @ 2024-04-16 116/week @ 2024-04-23 279/week @ 2024-04-30 27/week @ 2024-05-07 413/week @ 2024-05-14 281/week @ 2024-05-21 42/week @ 2024-05-28 32/week @ 2024-06-04 111/week @ 2024-06-11 156/week @ 2024-06-18 145/week @ 2024-06-25 198/week @ 2024-07-02 243/week @ 2024-07-09 100/week @ 2024-07-16

745 downloads per month
Used in coap-message-demos

MIT/Apache

17KB
306 lines

Maintenance

coap-request-implementations

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;

Stability

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


lib.rs:

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;

Stability

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).

Dependencies

~1.5MB
~28K SLoC