Struct fish::Server [−][src]
pub struct Server { /* fields omitted */ }
Expand description
A fully kitted-callback handling server that can handle async communication over HTTP-Webhooks
Implementations
Create a new callback server on the provided address
Example
ⓘ
let fish = Server::start("127.0.0.1:3306");
let hook = fish.spawn();
let _ = async {
reqwest::get(format!("http://some.api/?callback={}", hook.url())).await
};
// don't forget to spin up the server!
server.await
Create a callback server but with a proxy URL that will forward traffic
there. E.g. you could use ngrok
to tunnel a public Url to your
development server’s fish::Server
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Server
impl UnwindSafe for Server
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more