#[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
sourceimpl Clone for aws_host_resolver_vtable
impl Clone for aws_host_resolver_vtable
sourcefn clone(&self) -> aws_host_resolver_vtable
fn clone(&self) -> aws_host_resolver_vtable
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for aws_host_resolver_vtable
impl Debug for aws_host_resolver_vtable
sourceimpl Default for aws_host_resolver_vtable
impl Default for aws_host_resolver_vtable
sourcefn default() -> aws_host_resolver_vtable
fn default() -> aws_host_resolver_vtable
Returns the “default value” for a type. Read more
sourceimpl PartialEq<aws_host_resolver_vtable> for aws_host_resolver_vtable
impl PartialEq<aws_host_resolver_vtable> for aws_host_resolver_vtable
sourcefn eq(&self, other: &aws_host_resolver_vtable) -> bool
fn eq(&self, other: &aws_host_resolver_vtable) -> bool
impl Copy for aws_host_resolver_vtable
impl Eq for aws_host_resolver_vtable
impl StructuralEq for aws_host_resolver_vtable
impl StructuralPartialEq for aws_host_resolver_vtable
Auto Trait Implementations
impl RefUnwindSafe for aws_host_resolver_vtable
impl Send for aws_host_resolver_vtable
impl Sync for aws_host_resolver_vtable
impl Unpin for aws_host_resolver_vtable
impl UnwindSafe for aws_host_resolver_vtable
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more