#[repr(C)]
pub struct aws_host_resolver_vtable { pub destroy: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver)>, pub resolve_host: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver, host_name: *const aws_string, res: aws_on_host_resolved_result_fn, config: *mut aws_host_resolution_config, user_data: *mut c_void) -> c_int>, pub record_connection_failure: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver, address: *mut aws_host_address) -> c_int>, pub purge_cache: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver) -> c_int>, pub get_host_address_count: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver, host_name: *const aws_string, flags: u32) -> usize>, pub add_host_listener: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver, options: *const aws_host_listener_options) -> *mut aws_host_listener>, pub remove_host_listener: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver, listener: *mut aws_host_listener) -> c_int>, }
Expand description

should you absolutely disdain the default implementation, feel free to implement your own.

Fields

destroy: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver)>

clean up everything you allocated, but not resolver itself.

resolve_host: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver, host_name: *const aws_string, res: aws_on_host_resolved_result_fn, config: *mut aws_host_resolution_config, user_data: *mut c_void) -> c_int>

resolve the host by host_name, the user owns host_name, so it needs to be copied if you persist it, invoke res with the result. This function should never block.

record_connection_failure: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver, address: *mut aws_host_address) -> c_int>

gives your implementation a hint that an address has some failed connections occuring. Do whatever you want (or nothing) about it.

purge_cache: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver) -> c_int>

wipe out anything you have cached.

get_host_address_count: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver, host_name: *const aws_string, flags: u32) -> usize>

get number of addresses for a given host.

add_host_listener: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver, options: *const aws_host_listener_options) -> *mut aws_host_listener>

creates and adds a listener to the host resolver.

remove_host_listener: Option<unsafe extern "C" fn(resolver: *mut aws_host_resolver, listener: *mut aws_host_listener) -> c_int>

removes a host listener from the host resolver and frees it.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.