pub struct HostHttpHandler { /* private fields */ }Expand description
An HttpHandler handed to the library.
Implementations§
Source§impl HostHttpHandler
impl HostHttpHandler
pub fn new<H: HttpHandler + 'static>(handler: H) -> Self
Sourcepub fn as_ptr(&self) -> *mut c_void
pub fn as_ptr(&self) -> *mut c_void
Raw interfaces::HttpHandler*, for library calls that take one.
pub fn capabilities_through_native(&self) -> u32
Sourcepub fn get_through_native(&self, url: &str) -> HttpOutcome
pub fn get_through_native(&self, url: &str) -> HttpOutcome
Drive getAsync and collect the reply.
§Testing only
The native invoker behind this captures the response into a stack
local and returns as soon as getAsync does. A handler that
replies after returning therefore writes into a dead frame. Real
library call sites own the callback properly and may be replied to
whenever; this helper exists so tests can drive a handler without
standing up a CDN, and a handler used with it must reply before
returning.
pub fn get_range_through_native( &self, url: &str, start: u64, end: u64, ) -> HttpOutcome
Trait Implementations§
Source§impl Debug for HostHttpHandler
impl Debug for HostHttpHandler
Source§impl Drop for HostHttpHandler
impl Drop for HostHttpHandler
impl Send for HostHttpHandler
impl Sync for HostHttpHandler
Auto Trait Implementations§
impl !RefUnwindSafe for HostHttpHandler
impl !UnwindSafe for HostHttpHandler
impl Freeze for HostHttpHandler
impl Unpin for HostHttpHandler
impl UnsafeUnpin for HostHttpHandler
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