Trait gio::prelude::ResolverExt
source · [−]pub trait ResolverExt: 'static {
Show 17 methods
fn lookup_by_address(
&self,
address: &impl IsA<InetAddress>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<GString, Error>;
fn lookup_by_address_async<P: FnOnce(Result<GString, Error>) + 'static>(
&self,
address: &impl IsA<InetAddress>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn lookup_by_address_future(
&self,
address: &impl IsA<InetAddress> + Clone + 'static
) -> Pin<Box_<dyn Future<Output = Result<GString, Error>> + 'static>>;
fn lookup_by_name(
&self,
hostname: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Vec<InetAddress>, Error>;
fn lookup_by_name_async<P: FnOnce(Result<Vec<InetAddress>, Error>) + 'static>(
&self,
hostname: &str,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn lookup_by_name_future(
&self,
hostname: &str
) -> Pin<Box_<dyn Future<Output = Result<Vec<InetAddress>, Error>> + 'static>>;
fn lookup_by_name_with_flags(
&self,
hostname: &str,
flags: ResolverNameLookupFlags,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Vec<InetAddress>, Error>;
fn lookup_by_name_with_flags_async<P: FnOnce(Result<Vec<InetAddress>, Error>) + 'static>(
&self,
hostname: &str,
flags: ResolverNameLookupFlags,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn lookup_by_name_with_flags_future(
&self,
hostname: &str,
flags: ResolverNameLookupFlags
) -> Pin<Box_<dyn Future<Output = Result<Vec<InetAddress>, Error>> + 'static>>;
fn lookup_records(
&self,
rrname: &str,
record_type: ResolverRecordType,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Vec<Variant>, Error>;
fn lookup_records_async<P: FnOnce(Result<Vec<Variant>, Error>) + 'static>(
&self,
rrname: &str,
record_type: ResolverRecordType,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn lookup_records_future(
&self,
rrname: &str,
record_type: ResolverRecordType
) -> Pin<Box_<dyn Future<Output = Result<Vec<Variant>, Error>> + 'static>>;
fn lookup_service(
&self,
service: &str,
protocol: &str,
domain: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Vec<SrvTarget>, Error>;
fn lookup_service_async<P: FnOnce(Result<Vec<SrvTarget>, Error>) + 'static>(
&self,
service: &str,
protocol: &str,
domain: &str,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn lookup_service_future(
&self,
service: &str,
protocol: &str,
domain: &str
) -> Pin<Box_<dyn Future<Output = Result<Vec<SrvTarget>, Error>> + 'static>>;
fn set_default(&self);
fn connect_reload<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
}
Required Methods
sourcefn lookup_by_address(
fn lookup_by_address(
&self,
address: &impl IsA<InetAddress>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<GString, Error>
sourcefn lookup_by_address_async<P: FnOnce(Result<GString, Error>) + 'static>(
fn lookup_by_address_async<P: FnOnce(Result<GString, Error>) + 'static>(
&self,
address: &impl IsA<InetAddress>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
sourcefn lookup_by_address_future(
fn lookup_by_address_future(
&self,
address: &impl IsA<InetAddress> + Clone + 'static
) -> Pin<Box_<dyn Future<Output = Result<GString, Error>> + 'static>>
sourcefn lookup_by_name(
fn lookup_by_name(
&self,
hostname: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Vec<InetAddress>, Error>
sourcefn lookup_by_name_async<P: FnOnce(Result<Vec<InetAddress>, Error>) + 'static>(
fn lookup_by_name_async<P: FnOnce(Result<Vec<InetAddress>, Error>) + 'static>(
&self,
hostname: &str,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
sourcefn lookup_by_name_future(
fn lookup_by_name_future(
&self,
hostname: &str
) -> Pin<Box_<dyn Future<Output = Result<Vec<InetAddress>, Error>> + 'static>>
sourcefn lookup_by_name_with_flags(
&self,
hostname: &str,
flags: ResolverNameLookupFlags,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Vec<InetAddress>, Error>
fn lookup_by_name_with_flags(
&self,
hostname: &str,
flags: ResolverNameLookupFlags,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Vec<InetAddress>, Error>
Available on crate feature
v2_60
only.sourcefn lookup_by_name_with_flags_async<P: FnOnce(Result<Vec<InetAddress>, Error>) + 'static>(
&self,
hostname: &str,
flags: ResolverNameLookupFlags,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
fn lookup_by_name_with_flags_async<P: FnOnce(Result<Vec<InetAddress>, Error>) + 'static>(
&self,
hostname: &str,
flags: ResolverNameLookupFlags,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
Available on crate feature
v2_60
only.sourcefn lookup_by_name_with_flags_future(
&self,
hostname: &str,
flags: ResolverNameLookupFlags
) -> Pin<Box_<dyn Future<Output = Result<Vec<InetAddress>, Error>> + 'static>>
fn lookup_by_name_with_flags_future(
&self,
hostname: &str,
flags: ResolverNameLookupFlags
) -> Pin<Box_<dyn Future<Output = Result<Vec<InetAddress>, Error>> + 'static>>
Available on crate feature
v2_60
only.sourcefn lookup_records(
fn lookup_records(
&self,
rrname: &str,
record_type: ResolverRecordType,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Vec<Variant>, Error>
sourcefn lookup_records_async<P: FnOnce(Result<Vec<Variant>, Error>) + 'static>(
fn lookup_records_async<P: FnOnce(Result<Vec<Variant>, Error>) + 'static>(
&self,
rrname: &str,
record_type: ResolverRecordType,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
sourcefn lookup_records_future(
fn lookup_records_future(
&self,
rrname: &str,
record_type: ResolverRecordType
) -> Pin<Box_<dyn Future<Output = Result<Vec<Variant>, Error>> + 'static>>
sourcefn lookup_service(
fn lookup_service(
&self,
service: &str,
protocol: &str,
domain: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Vec<SrvTarget>, Error>
sourcefn lookup_service_async<P: FnOnce(Result<Vec<SrvTarget>, Error>) + 'static>(
fn lookup_service_async<P: FnOnce(Result<Vec<SrvTarget>, Error>) + 'static>(
&self,
service: &str,
protocol: &str,
domain: &str,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
sourcefn lookup_service_future(
fn lookup_service_future(
&self,
service: &str,
protocol: &str,
domain: &str
) -> Pin<Box_<dyn Future<Output = Result<Vec<SrvTarget>, Error>> + 'static>>
source
fn set_default(&self)
source