pub struct ArcedConnector(/* private fields */);Expand description
An Arced and type-erased Connector
Implementations§
Source§impl ArcedConnector
impl ArcedConnector
Sourcepub fn is<T: Any + 'static>(&self) -> bool
pub fn is<T: Any + 'static>(&self) -> bool
Determine if this ArcedConnector is the specified type
Sourcepub fn downcast_ref<T: Any + 'static>(&self) -> Option<&T>
pub fn downcast_ref<T: Any + 'static>(&self) -> Option<&T>
Attempt to borrow this ArcedConnector as the provided type, returning None if it does not
contain the type
Sourcepub fn downcast_mut<T: Any + 'static>(&mut self) -> Option<&mut T>
pub fn downcast_mut<T: Any + 'static>(&mut self) -> Option<&mut T>
Attempt to mutably borrow this ArcedConnector as the provided type, returning None if it
does not contain the type or if there are multiple outstanding clones of this arc
Trait Implementations§
Source§impl Clone for ArcedConnector
impl Clone for ArcedConnector
Source§fn clone(&self) -> ArcedConnector
fn clone(&self) -> ArcedConnector
Returns a duplicate 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 Connector for ArcedConnector
impl Connector for ArcedConnector
Source§type Runtime = Runtime
type Runtime = Runtime
The
RuntimeTrait for this ConnectorSource§type Udp = ()
type Udp = ()
The async UDP socket type for this connector. Used by QUIC adapters
for HTTP/3 support. Connectors that do not support UDP should set
this to
().Source§async fn connect(&self, url: &Url) -> Result<Box<dyn Transport>>
async fn connect(&self, url: &Url) -> Result<Box<dyn Transport>>
Initiate a connection to the provided url
Source§fn arced(self) -> ArcedConnector
fn arced(self) -> ArcedConnector
Returns an object-safe
ArcedConnector. Do not implement this.Auto Trait Implementations§
impl Freeze for ArcedConnector
impl !RefUnwindSafe for ArcedConnector
impl Send for ArcedConnector
impl Sync for ArcedConnector
impl Unpin for ArcedConnector
impl UnsafeUnpin for ArcedConnector
impl !UnwindSafe for ArcedConnector
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