Skip to main content

webview_bundle_protocol/protocol/
mod.rs

1mod bundle;
2mod local;
3
4use async_trait::async_trait;
5use std::borrow::Cow;
6use webview_bundle::http::{Request, Response};
7
8#[async_trait]
9pub trait Protocol: Send + Sync {
10  async fn handle(&self, request: Request<Vec<u8>>) -> crate::Result<Response<Cow<'static, [u8]>>>;
11}
12
13pub use bundle::*;
14pub use local::*;