/// Create endpoints with the incoming and outgoing encoding schemes explicitly
/// stated
/// ```no_run
/// # use dfn_core::over_explicit;
/// use dfn_json::Json;
///
/// #[export_name = "canister_query happy_birthday"]
/// fn hb() {
///     fn happy_birthday(Json((name, age)) :Json<(String, u16)>) -> Json<String> {
///         Json(format!("Happy Birthday {} {}", name, age))
///     }
///     over_explicit(happy_birthday)
/// }
/// ```
Create endpoints with the incoming and outgoing encoding schemes explicitly
stated
```no_run
Create endpoints with the incoming and outgoing encoding schemes explicitly stated ` ` ` no_run
pub fn over_explicit<In, Out, F>(f: F)
where
    In: FromWire + NewType,
    Out: IntoWire + NewType,
    F: FnOnce(In) -> Out,
{
    over_bytes(|inp| {
        let input = In::from_bytes(inp).expect("Deserialization Failed");
        let output = f(input);
        Out::into_bytes(output).expect("Serialization Failed")
    })
}
pub fn over_explicit < In , Out , F > ( f : F ) where In : FromWire + NewType , Out : IntoWire + NewType , F : FnOnce ( In ) -> Out , { over_bytes ( | inp | { let input = In :: from_bytes ( inp ) . expect ( " " ) ; let output = f ( input ) ; Out :: into_bytes ( output ) . expect ( " " ) } ) }
Create endpoints with the incoming and outgoing encoding schemes explicitly
stated
```no_run
Create endpoints with the incoming and outgoing encoding schemes explicitly stated ` ` ` no_run
f
F
use dfn_core::over_explicit;
None
[export_name = "canister_query happy_birthday"]
fn hb() {
fn happy_birthday(Json((name, age)) :Json<(String, u16)>) -> Json {
Json(format!("Happy Birthday {} {}", name, age))
}
over_explicit(happy_birthday)
}
```
fn hb () { fn happy_birthday ( Json (( name age )) : Json< ( String u16 ) > ) - > Json { Json ( format! ( " Happy Birthday {} {} " name age )) } over_explicit ( happy_birthday ) } ` ` `