coapcore

Struct OscoreEdhocHandler

Source
pub struct OscoreEdhocHandler<H: Handler, Crypto: Crypto, CryptoFactory: Fn() -> Crypto, SSC: ServerSecurityConfig, RNG: RngCore + CryptoRng> { /* private fields */ }
Expand description

A CoAP handler wrapping inner resources, and adding EDHOC and OSCORE and ACE support.

While the ACE (authz-info) and EDHOC parts could be implemented as a handler that is to be added into the tree, the OSCORE part needs to wrap the inner handler anyway, and EDHOC and OSCORE are intertwined rather strongly in processing the EDHOC option.

Implementations§

Source§

impl<H: Handler, Crypto: Crypto, CryptoFactory: Fn() -> Crypto, SSC: ServerSecurityConfig, RNG: RngCore + CryptoRng> OscoreEdhocHandler<H, Crypto, CryptoFactory, SSC, RNG>

Source

pub fn new( inner: H, authorities: SSC, crypto_factory: CryptoFactory, rng: RNG, ) -> Self

Creates a new CoAP server implementation (a [Handler][coap_handler::Handler]).

Trait Implementations§

Source§

impl<H: Handler, Crypto: Crypto, CryptoFactory: Fn() -> Crypto, SSC: ServerSecurityConfig, RNG: RngCore + CryptoRng> Handler for OscoreEdhocHandler<H, Crypto, CryptoFactory, SSC, RNG>

Source§

type RequestData = OrInner<OwnRequestData<Result<<H as Handler>::RequestData, <H as Handler>::ExtractRequestError>>, AuthorizationChecked<<H as Handler>::RequestData>>

Type constructed in extract_request_data() passed on to build_response(). Read more
Source§

type ExtractRequestError = OrInner<Error, <H as Handler>::ExtractRequestError>

Source§

type BuildResponseError<M: MinimalWritableMessage> = OrInner<Result<Error, <M as MinimalWritableMessage>::UnionError>, <H as Handler>::BuildResponseError<M>>

Source§

fn extract_request_data<M: ReadableMessage>( &mut self, request: &M, ) -> Result<Self::RequestData, Self::ExtractRequestError>

Process an incoming request. Read more
Source§

fn estimate_length(&mut self, req: &Self::RequestData) -> usize

Estimate an upper bound for the number of bytes in the response Read more
Source§

fn build_response<M: MutableWritableMessage>( &mut self, response: &mut M, req: Self::RequestData, ) -> Result<(), Self::BuildResponseError<M>>

Build a response for the request Read more

Auto Trait Implementations§

§

impl<H, Crypto, CryptoFactory, SSC, RNG> Freeze for OscoreEdhocHandler<H, Crypto, CryptoFactory, SSC, RNG>
where SSC: Freeze, H: Freeze, CryptoFactory: Freeze, RNG: Freeze, <SSC as ServerSecurityConfig>::Scope: Freeze, Crypto: Freeze,

§

impl<H, Crypto, CryptoFactory, SSC, RNG> RefUnwindSafe for OscoreEdhocHandler<H, Crypto, CryptoFactory, SSC, RNG>

§

impl<H, Crypto, CryptoFactory, SSC, RNG> !Send for OscoreEdhocHandler<H, Crypto, CryptoFactory, SSC, RNG>

§

impl<H, Crypto, CryptoFactory, SSC, RNG> !Sync for OscoreEdhocHandler<H, Crypto, CryptoFactory, SSC, RNG>

§

impl<H, Crypto, CryptoFactory, SSC, RNG> Unpin for OscoreEdhocHandler<H, Crypto, CryptoFactory, SSC, RNG>
where SSC: Unpin, H: Unpin, CryptoFactory: Unpin, RNG: Unpin, <SSC as ServerSecurityConfig>::Scope: Unpin, Crypto: Unpin,

§

impl<H, Crypto, CryptoFactory, SSC, RNG> UnwindSafe for OscoreEdhocHandler<H, Crypto, CryptoFactory, SSC, RNG>
where SSC: UnwindSafe, H: UnwindSafe, CryptoFactory: UnwindSafe, RNG: UnwindSafe, <SSC as ServerSecurityConfig>::Scope: UnwindSafe, Crypto: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.