wvb 0.2.0

Offline-first web resources delivery system for webview mounted frameworks/platforms
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod bundle;
#[cfg(feature = "protocol-local")]
mod local;
mod uri;

use async_trait::async_trait;
use std::borrow::Cow;

pub type ProtocolResponse = http::Response<Cow<'static, [u8]>>;

#[async_trait]
pub trait Protocol: Send + Sync {
  async fn handle(&self, request: http::Request<Vec<u8>>) -> crate::Result<ProtocolResponse>;
}

pub use bundle::*;
#[cfg(feature = "protocol-local")]
pub use local::*;