[][src]Struct webhook_router::Router

pub struct Router { /* fields omitted */ }

A router for the Iron framework.

Drops JSON objects which are received via POST into a directory using the current date as the filename.

Methods

impl Router[src]

pub fn new<P: Into<PathBuf>>(path: P) -> Result<Self, ConfigError>[src]

Create a new router for a path.

pub fn handle(&self, req: &Request<Vec<u8>>) -> Result<Response<String>, Error>[src]

Handle an incoming HTTP request.

This ends up deserializing the data as JSON if it validates. It is passed in as bytes to avoid forcing deserialization on the caller.

Auto Trait Implementations

impl RefUnwindSafe for Router

impl Send for Router

impl Sync for Router

impl Unpin for Router

impl UnwindSafe for Router

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,