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.
Trait Implementations§
§impl<UT> LiftRef<UT> for OhttpSession
impl<UT> LiftRef<UT> for OhttpSession
type LiftType = Arc<OhttpSession>
§impl<UT> LowerError<UT> for OhttpSession
impl<UT> LowerError<UT> for OhttpSession
§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
§impl<UT> LowerReturn<UT> for OhttpSession
impl<UT> LowerReturn<UT> for OhttpSession
§type ReturnType = <Arc<OhttpSession> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<OhttpSession> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
§impl<UT> TypeId<UT> for OhttpSession
impl<UT> TypeId<UT> for OhttpSession
const TYPE_ID_META: MetadataBuffer
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