#[non_exhaustive]pub enum BuiltInConnectionString {
Http(Url),
Ws(Url, Option<Authorization>),
Ipc(PathBuf),
}
Expand description
Connection string for built-in transports.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Http(Url)
Available on crate features
reqwest
or hyper
only.HTTP transport.
Ws(Url, Option<Authorization>)
Available on crate feature
ws
only.WebSocket transport.
Ipc(PathBuf)
Available on crate feature
ipc
only.IPC transport.
Implementations§
Source§impl BuiltInConnectionString
impl BuiltInConnectionString
Sourcepub async fn connect_boxed(&self) -> Result<BoxTransport, TransportError>
pub async fn connect_boxed(&self) -> Result<BoxTransport, TransportError>
Connect with the given connection string.
§Notes
- If
hyper
feature is enabled - WS will extract auth, however, auth is disabled for wasm.
Sourcepub fn try_as_http(s: &str) -> Result<Self, TransportError>
Available on crate features reqwest
or hyper
only.
pub fn try_as_http(s: &str) -> Result<Self, TransportError>
reqwest
or hyper
only.Tries to parse the given string as an HTTP URL.
Sourcepub fn try_as_ws(s: &str) -> Result<Self, TransportError>
Available on crate feature ws
only.
pub fn try_as_ws(s: &str) -> Result<Self, TransportError>
ws
only.Tries to parse the given string as a WebSocket URL.
Sourcepub fn try_as_ipc(s: &str) -> Result<Self, TransportError>
Available on crate feature ipc
only.
pub fn try_as_ipc(s: &str) -> Result<Self, TransportError>
ipc
only.Tries to parse the given string as an IPC path, returning an error if the path does not exist.
Trait Implementations§
Source§impl BoxTransportConnect for BuiltInConnectionString
impl BoxTransportConnect for BuiltInConnectionString
Source§fn get_boxed_transport<'a: 'b, 'b>(
&'a self,
) -> Pbf<'b, BoxTransport, TransportError>
fn get_boxed_transport<'a: 'b, 'b>( &'a self, ) -> Pbf<'b, BoxTransport, TransportError>
Connect to a transport, and box it.
Source§impl Clone for BuiltInConnectionString
impl Clone for BuiltInConnectionString
Source§fn clone(&self) -> BuiltInConnectionString
fn clone(&self) -> BuiltInConnectionString
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BuiltInConnectionString
impl Debug for BuiltInConnectionString
Source§impl FromStr for BuiltInConnectionString
impl FromStr for BuiltInConnectionString
Source§impl PartialEq for BuiltInConnectionString
impl PartialEq for BuiltInConnectionString
impl Eq for BuiltInConnectionString
impl StructuralPartialEq for BuiltInConnectionString
Auto Trait Implementations§
impl Freeze for BuiltInConnectionString
impl RefUnwindSafe for BuiltInConnectionString
impl Send for BuiltInConnectionString
impl Sync for BuiltInConnectionString
impl Unpin for BuiltInConnectionString
impl UnwindSafe for BuiltInConnectionString
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.