Skip to main content

attach_or_fallback

Function attach_or_fallback 

Source
pub fn attach_or_fallback<T>(
    config: &ClientConfig,
    expect: Option<&HostExpectation>,
    fallback: impl FnOnce() -> T,
) -> Attached<T>
Expand description

Connect to the resident daemon described by config, or run fallback. expect pins the host to a program (see Client::connect_expecting); without it any same-user host is accepted.