coapcore::scope

Trait Scope

Source
pub trait Scope: Sized + Debug {
    // Required method
    fn request_is_allowed<M: ReadableMessage>(&self, request: &M) -> bool;

    // Provided method
    fn is_admin(&self) -> bool { ... }
}
Expand description

A data item representing the server access policy as evaluated for a particular security context.

Required Methods§

Source

fn request_is_allowed<M: ReadableMessage>(&self, request: &M) -> bool

Returns true if a request may be performed by the bound security context.

Provided Methods§

Source

fn is_admin(&self) -> bool

Returns true if a bound security context should be preferably retained when hitting resource limits.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Scope for Infallible

Source§

fn request_is_allowed<M: ReadableMessage>(&self, _request: &M) -> bool

Implementors§