Trait fdk::InputCoercible
[−]
[src]
pub trait InputCoercible: Sized { fn try_decode(req: Request) -> Result<Self, FunctionError>; }
An InputCoercible
type can be generated from a hyper::Request
.
Required Methods
fn try_decode(req: Request) -> Result<Self, FunctionError>
Consume the request and try to convert it into an instance of the type. If this fails, report an appropriate FunctionError.
Implementations on Foreign Types
impl InputCoercible for Request
[src]
Request is coercible to itself.
fn try_decode(req: Request) -> Result<Request, FunctionError>
[src]
impl InputCoercible for ()
[src]
The empty type is InputCoercible, for simplicity
fn try_decode(_: Request) -> Result<(), FunctionError>
[src]
impl InputCoercible for Vec<u8>
[src]
A vector of bytes is InputCoercible, for simplicity
fn try_decode(req: Request) -> Result<Vec<u8>, FunctionError>
[src]
impl InputCoercible for String
[src]
String is InputCoercible, for simplicity
fn try_decode(req: Request) -> Result<String, FunctionError>
[src]
impl InputCoercible for Value
[src]
serde_json::Value is InputCoercible, for simplicity