Skip to main content

HostProvider

Trait HostProvider 

Source
pub trait HostProvider {
    type Error;

    // Required method
    fn get_hostname<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Provides information about the process host itself.

Required Associated Types§

Source

type Error

Errors produced by the provider.

Required Methods§

Source

fn get_hostname<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets the hostname of the process host.

§Errors

If an error occurs while querying the hostname, an error is returned.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§