pub struct OhttpSession { /* private fields */ }
Implementations§
source§impl OhttpSession
impl OhttpSession
sourcepub fn new(config: &[u8]) -> Result<Self, OhttpError>
pub fn new(config: &[u8]) -> Result<Self, OhttpError>
Create a new encryption session for use with specific key configuration
sourcepub fn encapsulate(
&self,
method: &str,
scheme: &str,
server: &str,
endpoint: &str,
headers: HashMap<String, String>,
payload: &[u8],
) -> Result<Vec<u8>, OhttpError>
pub fn encapsulate( &self, method: &str, scheme: &str, server: &str, endpoint: &str, headers: HashMap<String, String>, payload: &[u8], ) -> Result<Vec<u8>, OhttpError>
Encode an HTTP request in Binary HTTP format and then encrypt it into an Oblivious HTTP request message.
sourcepub fn decapsulate(&self, encoded: &[u8]) -> Result<OhttpResponse, OhttpError>
pub fn decapsulate(&self, encoded: &[u8]) -> Result<OhttpResponse, OhttpError>
Decode an OHTTP response returned in response to a request encoded on this session.
Auto Trait Implementations§
impl !Freeze for OhttpSession
impl !RefUnwindSafe for OhttpSession
impl Send for OhttpSession
impl Sync for OhttpSession
impl Unpin for OhttpSession
impl UnwindSafe for OhttpSession
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read more