pub struct HttpTransport { /* private fields */ }Expand description
Transport over HTTP(S).
Implementations§
Source§impl HttpTransport
impl HttpTransport
pub fn with_timeout(base_url: &str, timeout: Duration) -> Result<Self>
Sourcepub async fn connect(
server: &CloudServer,
options: ConnectOptions,
) -> Result<Self>
pub async fn connect( server: &CloudServer, options: ConnectOptions, ) -> Result<Self>
A transport to server, at the address resolve_server_url picks.
pub fn base_url(&self) -> String
Sourcepub fn set_base_url(&self, base_url: &str) -> Result<()>
pub fn set_base_url(&self, base_url: &str) -> Result<()>
Switches to another address, for example after the network changed.
Trait Implementations§
Source§impl Debug for HttpTransport
impl Debug for HttpTransport
Source§impl Transport for HttpTransport
impl Transport for HttpTransport
fn request<'life0, 'async_trait>(
&'life0 self,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn subscribe<'life0, 'async_trait>(
&'life0 self,
request: EventRequest,
) -> Pin<Box<dyn Future<Output = Result<RawEventStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe<'life0, 'async_trait>(
&'life0 self,
request: EventRequest,
) -> Pin<Box<dyn Future<Output = Result<RawEventStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Opens a server-pushed event stream. The protocol (SSE, DataChannel…) is a
transport detail.
Source§fn http_base_url(&self) -> Option<String>
fn http_base_url(&self) -> Option<String>
The
http(s)://host:port base of the server, when it is reachable over plain
HTTP. Lets code that fetches files itself (a video player) build URLs for them,
see crate::RedseatClient::authorized_url. None (the default) for
transports that are not HTTP.Auto Trait Implementations§
impl !Freeze for HttpTransport
impl !RefUnwindSafe for HttpTransport
impl !UnwindSafe for HttpTransport
impl Forget for HttpTransport
impl Move for HttpTransport
impl Send for HttpTransport
impl Sync for HttpTransport
impl Unpin for HttpTransport
impl UnsafeUnpin for HttpTransportwhere
*const ArcInner<ClientRef> is !null: UnsafeUnpin,
PhantomData<ArcInner<ClientRef>>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
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