http-wasm-guest 0.8.0

a library providing a http-wasm guest handler
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::{
    api::{self, Bytes},
    host::handler,
};

pub(crate) struct Body(pub i32);

impl api::Body for Body {
    fn read(&self) -> Bytes {
        Bytes::from(handler::body(self.0))
    }

    fn write(&self, body: &[u8]) {
        handler::write_body(self.0, body);
    }
}