pub struct ControlDialer { /* private fields */ }Expand description
Manages state for control dial plan and handles selection of successive dial candidates.
Implementations§
Source§impl ControlDialer
impl ControlDialer
Sourcepub fn update_dial_plan(&mut self, plan: &DialPlan) -> bool
pub fn update_dial_plan(&mut self, plan: &DialPlan) -> bool
Update the stored dial plan with the new plan.
Returns whether the dial plan changed. Resubmission of the same dial plan is idempotent.
Sourcepub fn clear_attempted(&mut self)
pub fn clear_attempted(&mut self)
Clear the set of attempted dial candidates.
This will cause future connection attempts to retry all available dialers in priority order.
Sourcepub fn next_dialer(&mut self) -> impl TcpDialer + Debug
pub fn next_dialer(&mut self) -> impl TcpDialer + Debug
Get the next dialer candidate from the dial plan.
If all dialers have already been tried, falls back to system DNS.
NB: the returned TcpDialer does not mark its corresponding candidate as having
been attempted until TcpDialer::dial is called – it is fine semantically to
drop the returned dialer without calling dial.
Sourcepub async fn full_connect_next(
&mut self,
url: &Url,
machine_keys: &MachineKeyPair,
) -> Result<Http2<BytesBody>, ConnectionError>
pub async fn full_connect_next( &mut self, url: &Url, machine_keys: &MachineKeyPair, ) -> Result<Http2<BytesBody>, ConnectionError>
Convenience wrapper for next_dialer followed by
complete_connection.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ControlDialer
impl RefUnwindSafe for ControlDialer
impl Send for ControlDialer
impl Sync for ControlDialer
impl Unpin for ControlDialer
impl UnsafeUnpin for ControlDialer
impl UnwindSafe for ControlDialer
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