Skip to main content

ContentTypePolicy

Trait ContentTypePolicy 

Source
pub trait ContentTypePolicy: Send + Sync {
    // Required method
    fn accepts_content_type(&self, headers: &HeaderMap) -> bool;
}
Available on crate feature server only.
Expand description

What OcpiJson needs from the router’s state.

Required Methods§

Source

fn accepts_content_type(&self, headers: &HeaderMap) -> bool

Whether a request with these headers carries an acceptable Content-Type.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ContentTypePolicy for Arc<OcpiState>

Implementors§