gio/auto/
inet_address.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{ffi, SocketFamily};
6use glib::{
7    prelude::*,
8    signal::{connect_raw, SignalHandlerId},
9    translate::*,
10};
11use std::boxed::Box as Box_;
12
13glib::wrapper! {
14    /// `GInetAddress` represents an IPv4 or IPv6 internet address. Use
15    /// [`ResolverExt::lookup_by_name()`][crate::prelude::ResolverExt::lookup_by_name()] or
16    /// [`ResolverExt::lookup_by_name_async()`][crate::prelude::ResolverExt::lookup_by_name_async()] to look up the `GInetAddress` for
17    /// a hostname. Use [`ResolverExt::lookup_by_address()`][crate::prelude::ResolverExt::lookup_by_address()] or
18    /// [`ResolverExt::lookup_by_address_async()`][crate::prelude::ResolverExt::lookup_by_address_async()] to look up the hostname for a
19    /// `GInetAddress`.
20    ///
21    /// To actually connect to a remote host, you will need a
22    /// [`InetSocketAddress`][crate::InetSocketAddress] (which includes a `GInetAddress` as well as a
23    /// port number).
24    ///
25    /// ## Properties
26    ///
27    ///
28    /// #### `bytes`
29    ///  The raw address data.
30    ///
31    /// Readable | Writeable | Construct Only
32    ///
33    ///
34    /// #### `family`
35    ///  The address family (IPv4 or IPv6).
36    ///
37    /// Readable | Writeable | Construct Only
38    ///
39    ///
40    /// #### `is-any`
41    ///  Whether this is the "any" address for its family.
42    /// See g_inet_address_get_is_any().
43    ///
44    /// Readable
45    ///
46    ///
47    /// #### `is-link-local`
48    ///  Whether this is a link-local address.
49    /// See g_inet_address_get_is_link_local().
50    ///
51    /// Readable
52    ///
53    ///
54    /// #### `is-loopback`
55    ///  Whether this is the loopback address for its family.
56    /// See g_inet_address_get_is_loopback().
57    ///
58    /// Readable
59    ///
60    ///
61    /// #### `is-mc-global`
62    ///  Whether this is a global multicast address.
63    /// See g_inet_address_get_is_mc_global().
64    ///
65    /// Readable
66    ///
67    ///
68    /// #### `is-mc-link-local`
69    ///  Whether this is a link-local multicast address.
70    /// See g_inet_address_get_is_mc_link_local().
71    ///
72    /// Readable
73    ///
74    ///
75    /// #### `is-mc-node-local`
76    ///  Whether this is a node-local multicast address.
77    /// See g_inet_address_get_is_mc_node_local().
78    ///
79    /// Readable
80    ///
81    ///
82    /// #### `is-mc-org-local`
83    ///  Whether this is an organization-local multicast address.
84    /// See g_inet_address_get_is_mc_org_local().
85    ///
86    /// Readable
87    ///
88    ///
89    /// #### `is-mc-site-local`
90    ///  Whether this is a site-local multicast address.
91    /// See g_inet_address_get_is_mc_site_local().
92    ///
93    /// Readable
94    ///
95    ///
96    /// #### `is-multicast`
97    ///  Whether this is a multicast address.
98    /// See g_inet_address_get_is_multicast().
99    ///
100    /// Readable
101    ///
102    ///
103    /// #### `is-site-local`
104    ///  Whether this is a site-local address.
105    /// See g_inet_address_get_is_loopback().
106    ///
107    /// Readable
108    ///
109    /// # Implements
110    ///
111    /// [`InetAddressExt`][trait@crate::prelude::InetAddressExt], [`trait@glib::ObjectExt`], [`InetAddressExtManual`][trait@crate::prelude::InetAddressExtManual]
112    #[doc(alias = "GInetAddress")]
113    pub struct InetAddress(Object<ffi::GInetAddress, ffi::GInetAddressClass>);
114
115    match fn {
116        type_ => || ffi::g_inet_address_get_type(),
117    }
118}
119
120impl InetAddress {
121    pub const NONE: Option<&'static InetAddress> = None;
122
123    /// Creates a #GInetAddress for the "any" address (unassigned/"don't
124    /// care") for @family.
125    /// ## `family`
126    /// the address family
127    ///
128    /// # Returns
129    ///
130    /// a new #GInetAddress corresponding to the "any" address
131    /// for @family.
132    ///     Free the returned object with g_object_unref().
133    #[doc(alias = "g_inet_address_new_any")]
134    pub fn new_any(family: SocketFamily) -> InetAddress {
135        unsafe { from_glib_full(ffi::g_inet_address_new_any(family.into_glib())) }
136    }
137
138    /// Parses @string as an IP address and creates a new #GInetAddress.
139    /// ## `string`
140    /// a string representation of an IP address
141    ///
142    /// # Returns
143    ///
144    /// a new #GInetAddress corresponding
145    /// to @string, or [`None`] if @string could not be parsed.
146    ///     Free the returned object with g_object_unref().
147    #[doc(alias = "g_inet_address_new_from_string")]
148    #[doc(alias = "new_from_string")]
149    pub fn from_string(string: &str) -> Option<InetAddress> {
150        unsafe { from_glib_full(ffi::g_inet_address_new_from_string(string.to_glib_none().0)) }
151    }
152
153    /// Creates a #GInetAddress for the loopback address for @family.
154    /// ## `family`
155    /// the address family
156    ///
157    /// # Returns
158    ///
159    /// a new #GInetAddress corresponding to the loopback address
160    /// for @family.
161    ///     Free the returned object with g_object_unref().
162    #[doc(alias = "g_inet_address_new_loopback")]
163    pub fn new_loopback(family: SocketFamily) -> InetAddress {
164        unsafe { from_glib_full(ffi::g_inet_address_new_loopback(family.into_glib())) }
165    }
166}
167
168impl std::fmt::Display for InetAddress {
169    #[inline]
170    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
171        f.write_str(&InetAddressExt::to_str(self))
172    }
173}
174
175unsafe impl Send for InetAddress {}
176unsafe impl Sync for InetAddress {}
177
178/// Trait containing all [`struct@InetAddress`] methods.
179///
180/// # Implementors
181///
182/// [`InetAddress`][struct@crate::InetAddress]
183pub trait InetAddressExt: IsA<InetAddress> + 'static {
184    #[doc(alias = "g_inet_address_equal")]
185    fn equal(&self, other_address: &impl IsA<InetAddress>) -> bool {
186        unsafe {
187            from_glib(ffi::g_inet_address_equal(
188                self.as_ref().to_glib_none().0,
189                other_address.as_ref().to_glib_none().0,
190            ))
191        }
192    }
193
194    /// Gets @self's family
195    ///
196    /// # Returns
197    ///
198    /// @self's family
199    #[doc(alias = "g_inet_address_get_family")]
200    #[doc(alias = "get_family")]
201    fn family(&self) -> SocketFamily {
202        unsafe {
203            from_glib(ffi::g_inet_address_get_family(
204                self.as_ref().to_glib_none().0,
205            ))
206        }
207    }
208
209    /// Tests whether @self is the "any" address for its family.
210    ///
211    /// # Returns
212    ///
213    /// [`true`] if @self is the "any" address for its family.
214    #[doc(alias = "g_inet_address_get_is_any")]
215    #[doc(alias = "get_is_any")]
216    #[doc(alias = "is-any")]
217    fn is_any(&self) -> bool {
218        unsafe {
219            from_glib(ffi::g_inet_address_get_is_any(
220                self.as_ref().to_glib_none().0,
221            ))
222        }
223    }
224
225    /// Tests whether @self is a link-local address (that is, if it
226    /// identifies a host on a local network that is not connected to the
227    /// Internet).
228    ///
229    /// # Returns
230    ///
231    /// [`true`] if @self is a link-local address.
232    #[doc(alias = "g_inet_address_get_is_link_local")]
233    #[doc(alias = "get_is_link_local")]
234    #[doc(alias = "is-link-local")]
235    fn is_link_local(&self) -> bool {
236        unsafe {
237            from_glib(ffi::g_inet_address_get_is_link_local(
238                self.as_ref().to_glib_none().0,
239            ))
240        }
241    }
242
243    /// Tests whether @self is the loopback address for its family.
244    ///
245    /// # Returns
246    ///
247    /// [`true`] if @self is the loopback address for its family.
248    #[doc(alias = "g_inet_address_get_is_loopback")]
249    #[doc(alias = "get_is_loopback")]
250    #[doc(alias = "is-loopback")]
251    fn is_loopback(&self) -> bool {
252        unsafe {
253            from_glib(ffi::g_inet_address_get_is_loopback(
254                self.as_ref().to_glib_none().0,
255            ))
256        }
257    }
258
259    /// Tests whether @self is a global multicast address.
260    ///
261    /// # Returns
262    ///
263    /// [`true`] if @self is a global multicast address.
264    #[doc(alias = "g_inet_address_get_is_mc_global")]
265    #[doc(alias = "get_is_mc_global")]
266    #[doc(alias = "is-mc-global")]
267    fn is_mc_global(&self) -> bool {
268        unsafe {
269            from_glib(ffi::g_inet_address_get_is_mc_global(
270                self.as_ref().to_glib_none().0,
271            ))
272        }
273    }
274
275    /// Tests whether @self is a link-local multicast address.
276    ///
277    /// # Returns
278    ///
279    /// [`true`] if @self is a link-local multicast address.
280    #[doc(alias = "g_inet_address_get_is_mc_link_local")]
281    #[doc(alias = "get_is_mc_link_local")]
282    #[doc(alias = "is-mc-link-local")]
283    fn is_mc_link_local(&self) -> bool {
284        unsafe {
285            from_glib(ffi::g_inet_address_get_is_mc_link_local(
286                self.as_ref().to_glib_none().0,
287            ))
288        }
289    }
290
291    /// Tests whether @self is a node-local multicast address.
292    ///
293    /// # Returns
294    ///
295    /// [`true`] if @self is a node-local multicast address.
296    #[doc(alias = "g_inet_address_get_is_mc_node_local")]
297    #[doc(alias = "get_is_mc_node_local")]
298    #[doc(alias = "is-mc-node-local")]
299    fn is_mc_node_local(&self) -> bool {
300        unsafe {
301            from_glib(ffi::g_inet_address_get_is_mc_node_local(
302                self.as_ref().to_glib_none().0,
303            ))
304        }
305    }
306
307    /// Tests whether @self is an organization-local multicast address.
308    ///
309    /// # Returns
310    ///
311    /// [`true`] if @self is an organization-local multicast address.
312    #[doc(alias = "g_inet_address_get_is_mc_org_local")]
313    #[doc(alias = "get_is_mc_org_local")]
314    #[doc(alias = "is-mc-org-local")]
315    fn is_mc_org_local(&self) -> bool {
316        unsafe {
317            from_glib(ffi::g_inet_address_get_is_mc_org_local(
318                self.as_ref().to_glib_none().0,
319            ))
320        }
321    }
322
323    /// Tests whether @self is a site-local multicast address.
324    ///
325    /// # Returns
326    ///
327    /// [`true`] if @self is a site-local multicast address.
328    #[doc(alias = "g_inet_address_get_is_mc_site_local")]
329    #[doc(alias = "get_is_mc_site_local")]
330    #[doc(alias = "is-mc-site-local")]
331    fn is_mc_site_local(&self) -> bool {
332        unsafe {
333            from_glib(ffi::g_inet_address_get_is_mc_site_local(
334                self.as_ref().to_glib_none().0,
335            ))
336        }
337    }
338
339    /// Tests whether @self is a multicast address.
340    ///
341    /// # Returns
342    ///
343    /// [`true`] if @self is a multicast address.
344    #[doc(alias = "g_inet_address_get_is_multicast")]
345    #[doc(alias = "get_is_multicast")]
346    #[doc(alias = "is-multicast")]
347    fn is_multicast(&self) -> bool {
348        unsafe {
349            from_glib(ffi::g_inet_address_get_is_multicast(
350                self.as_ref().to_glib_none().0,
351            ))
352        }
353    }
354
355    /// Tests whether @self is a site-local address such as 10.0.0.1
356    /// (that is, the address identifies a host on a local network that can
357    /// not be reached directly from the Internet, but which may have
358    /// outgoing Internet connectivity via a NAT or firewall).
359    ///
360    /// # Returns
361    ///
362    /// [`true`] if @self is a site-local address.
363    #[doc(alias = "g_inet_address_get_is_site_local")]
364    #[doc(alias = "get_is_site_local")]
365    #[doc(alias = "is-site-local")]
366    fn is_site_local(&self) -> bool {
367        unsafe {
368            from_glib(ffi::g_inet_address_get_is_site_local(
369                self.as_ref().to_glib_none().0,
370            ))
371        }
372    }
373
374    /// Gets the size of the native raw binary address for @self. This
375    /// is the size of the data that you get from g_inet_address_to_bytes().
376    ///
377    /// # Returns
378    ///
379    /// the number of bytes used for the native version of @self.
380    #[doc(alias = "g_inet_address_get_native_size")]
381    #[doc(alias = "get_native_size")]
382    fn native_size(&self) -> usize {
383        unsafe { ffi::g_inet_address_get_native_size(self.as_ref().to_glib_none().0) }
384    }
385
386    /// Converts @self to string form.
387    ///
388    /// # Returns
389    ///
390    /// a representation of @self as a string, which should be
391    /// freed after use.
392    #[doc(alias = "g_inet_address_to_string")]
393    #[doc(alias = "to_string")]
394    fn to_str(&self) -> glib::GString {
395        unsafe {
396            from_glib_full(ffi::g_inet_address_to_string(
397                self.as_ref().to_glib_none().0,
398            ))
399        }
400    }
401
402    //fn bytes(&self) -> /*Unimplemented*/Basic: Pointer {
403    //    ObjectExt::property(self.as_ref(), "bytes")
404    //}
405
406    #[doc(alias = "is-any")]
407    fn connect_is_any_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
408        unsafe extern "C" fn notify_is_any_trampoline<
409            P: IsA<InetAddress>,
410            F: Fn(&P) + Send + Sync + 'static,
411        >(
412            this: *mut ffi::GInetAddress,
413            _param_spec: glib::ffi::gpointer,
414            f: glib::ffi::gpointer,
415        ) {
416            let f: &F = &*(f as *const F);
417            f(InetAddress::from_glib_borrow(this).unsafe_cast_ref())
418        }
419        unsafe {
420            let f: Box_<F> = Box_::new(f);
421            connect_raw(
422                self.as_ptr() as *mut _,
423                c"notify::is-any".as_ptr() as *const _,
424                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
425                    notify_is_any_trampoline::<Self, F> as *const (),
426                )),
427                Box_::into_raw(f),
428            )
429        }
430    }
431
432    #[doc(alias = "is-link-local")]
433    fn connect_is_link_local_notify<F: Fn(&Self) + Send + Sync + 'static>(
434        &self,
435        f: F,
436    ) -> SignalHandlerId {
437        unsafe extern "C" fn notify_is_link_local_trampoline<
438            P: IsA<InetAddress>,
439            F: Fn(&P) + Send + Sync + 'static,
440        >(
441            this: *mut ffi::GInetAddress,
442            _param_spec: glib::ffi::gpointer,
443            f: glib::ffi::gpointer,
444        ) {
445            let f: &F = &*(f as *const F);
446            f(InetAddress::from_glib_borrow(this).unsafe_cast_ref())
447        }
448        unsafe {
449            let f: Box_<F> = Box_::new(f);
450            connect_raw(
451                self.as_ptr() as *mut _,
452                c"notify::is-link-local".as_ptr() as *const _,
453                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
454                    notify_is_link_local_trampoline::<Self, F> as *const (),
455                )),
456                Box_::into_raw(f),
457            )
458        }
459    }
460
461    #[doc(alias = "is-loopback")]
462    fn connect_is_loopback_notify<F: Fn(&Self) + Send + Sync + 'static>(
463        &self,
464        f: F,
465    ) -> SignalHandlerId {
466        unsafe extern "C" fn notify_is_loopback_trampoline<
467            P: IsA<InetAddress>,
468            F: Fn(&P) + Send + Sync + 'static,
469        >(
470            this: *mut ffi::GInetAddress,
471            _param_spec: glib::ffi::gpointer,
472            f: glib::ffi::gpointer,
473        ) {
474            let f: &F = &*(f as *const F);
475            f(InetAddress::from_glib_borrow(this).unsafe_cast_ref())
476        }
477        unsafe {
478            let f: Box_<F> = Box_::new(f);
479            connect_raw(
480                self.as_ptr() as *mut _,
481                c"notify::is-loopback".as_ptr() as *const _,
482                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
483                    notify_is_loopback_trampoline::<Self, F> as *const (),
484                )),
485                Box_::into_raw(f),
486            )
487        }
488    }
489
490    #[doc(alias = "is-mc-global")]
491    fn connect_is_mc_global_notify<F: Fn(&Self) + Send + Sync + 'static>(
492        &self,
493        f: F,
494    ) -> SignalHandlerId {
495        unsafe extern "C" fn notify_is_mc_global_trampoline<
496            P: IsA<InetAddress>,
497            F: Fn(&P) + Send + Sync + 'static,
498        >(
499            this: *mut ffi::GInetAddress,
500            _param_spec: glib::ffi::gpointer,
501            f: glib::ffi::gpointer,
502        ) {
503            let f: &F = &*(f as *const F);
504            f(InetAddress::from_glib_borrow(this).unsafe_cast_ref())
505        }
506        unsafe {
507            let f: Box_<F> = Box_::new(f);
508            connect_raw(
509                self.as_ptr() as *mut _,
510                c"notify::is-mc-global".as_ptr() as *const _,
511                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
512                    notify_is_mc_global_trampoline::<Self, F> as *const (),
513                )),
514                Box_::into_raw(f),
515            )
516        }
517    }
518
519    #[doc(alias = "is-mc-link-local")]
520    fn connect_is_mc_link_local_notify<F: Fn(&Self) + Send + Sync + 'static>(
521        &self,
522        f: F,
523    ) -> SignalHandlerId {
524        unsafe extern "C" fn notify_is_mc_link_local_trampoline<
525            P: IsA<InetAddress>,
526            F: Fn(&P) + Send + Sync + 'static,
527        >(
528            this: *mut ffi::GInetAddress,
529            _param_spec: glib::ffi::gpointer,
530            f: glib::ffi::gpointer,
531        ) {
532            let f: &F = &*(f as *const F);
533            f(InetAddress::from_glib_borrow(this).unsafe_cast_ref())
534        }
535        unsafe {
536            let f: Box_<F> = Box_::new(f);
537            connect_raw(
538                self.as_ptr() as *mut _,
539                c"notify::is-mc-link-local".as_ptr() as *const _,
540                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
541                    notify_is_mc_link_local_trampoline::<Self, F> as *const (),
542                )),
543                Box_::into_raw(f),
544            )
545        }
546    }
547
548    #[doc(alias = "is-mc-node-local")]
549    fn connect_is_mc_node_local_notify<F: Fn(&Self) + Send + Sync + 'static>(
550        &self,
551        f: F,
552    ) -> SignalHandlerId {
553        unsafe extern "C" fn notify_is_mc_node_local_trampoline<
554            P: IsA<InetAddress>,
555            F: Fn(&P) + Send + Sync + 'static,
556        >(
557            this: *mut ffi::GInetAddress,
558            _param_spec: glib::ffi::gpointer,
559            f: glib::ffi::gpointer,
560        ) {
561            let f: &F = &*(f as *const F);
562            f(InetAddress::from_glib_borrow(this).unsafe_cast_ref())
563        }
564        unsafe {
565            let f: Box_<F> = Box_::new(f);
566            connect_raw(
567                self.as_ptr() as *mut _,
568                c"notify::is-mc-node-local".as_ptr() as *const _,
569                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
570                    notify_is_mc_node_local_trampoline::<Self, F> as *const (),
571                )),
572                Box_::into_raw(f),
573            )
574        }
575    }
576
577    #[doc(alias = "is-mc-org-local")]
578    fn connect_is_mc_org_local_notify<F: Fn(&Self) + Send + Sync + 'static>(
579        &self,
580        f: F,
581    ) -> SignalHandlerId {
582        unsafe extern "C" fn notify_is_mc_org_local_trampoline<
583            P: IsA<InetAddress>,
584            F: Fn(&P) + Send + Sync + 'static,
585        >(
586            this: *mut ffi::GInetAddress,
587            _param_spec: glib::ffi::gpointer,
588            f: glib::ffi::gpointer,
589        ) {
590            let f: &F = &*(f as *const F);
591            f(InetAddress::from_glib_borrow(this).unsafe_cast_ref())
592        }
593        unsafe {
594            let f: Box_<F> = Box_::new(f);
595            connect_raw(
596                self.as_ptr() as *mut _,
597                c"notify::is-mc-org-local".as_ptr() as *const _,
598                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
599                    notify_is_mc_org_local_trampoline::<Self, F> as *const (),
600                )),
601                Box_::into_raw(f),
602            )
603        }
604    }
605
606    #[doc(alias = "is-mc-site-local")]
607    fn connect_is_mc_site_local_notify<F: Fn(&Self) + Send + Sync + 'static>(
608        &self,
609        f: F,
610    ) -> SignalHandlerId {
611        unsafe extern "C" fn notify_is_mc_site_local_trampoline<
612            P: IsA<InetAddress>,
613            F: Fn(&P) + Send + Sync + 'static,
614        >(
615            this: *mut ffi::GInetAddress,
616            _param_spec: glib::ffi::gpointer,
617            f: glib::ffi::gpointer,
618        ) {
619            let f: &F = &*(f as *const F);
620            f(InetAddress::from_glib_borrow(this).unsafe_cast_ref())
621        }
622        unsafe {
623            let f: Box_<F> = Box_::new(f);
624            connect_raw(
625                self.as_ptr() as *mut _,
626                c"notify::is-mc-site-local".as_ptr() as *const _,
627                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
628                    notify_is_mc_site_local_trampoline::<Self, F> as *const (),
629                )),
630                Box_::into_raw(f),
631            )
632        }
633    }
634
635    #[doc(alias = "is-multicast")]
636    fn connect_is_multicast_notify<F: Fn(&Self) + Send + Sync + 'static>(
637        &self,
638        f: F,
639    ) -> SignalHandlerId {
640        unsafe extern "C" fn notify_is_multicast_trampoline<
641            P: IsA<InetAddress>,
642            F: Fn(&P) + Send + Sync + 'static,
643        >(
644            this: *mut ffi::GInetAddress,
645            _param_spec: glib::ffi::gpointer,
646            f: glib::ffi::gpointer,
647        ) {
648            let f: &F = &*(f as *const F);
649            f(InetAddress::from_glib_borrow(this).unsafe_cast_ref())
650        }
651        unsafe {
652            let f: Box_<F> = Box_::new(f);
653            connect_raw(
654                self.as_ptr() as *mut _,
655                c"notify::is-multicast".as_ptr() as *const _,
656                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
657                    notify_is_multicast_trampoline::<Self, F> as *const (),
658                )),
659                Box_::into_raw(f),
660            )
661        }
662    }
663
664    #[doc(alias = "is-site-local")]
665    fn connect_is_site_local_notify<F: Fn(&Self) + Send + Sync + 'static>(
666        &self,
667        f: F,
668    ) -> SignalHandlerId {
669        unsafe extern "C" fn notify_is_site_local_trampoline<
670            P: IsA<InetAddress>,
671            F: Fn(&P) + Send + Sync + 'static,
672        >(
673            this: *mut ffi::GInetAddress,
674            _param_spec: glib::ffi::gpointer,
675            f: glib::ffi::gpointer,
676        ) {
677            let f: &F = &*(f as *const F);
678            f(InetAddress::from_glib_borrow(this).unsafe_cast_ref())
679        }
680        unsafe {
681            let f: Box_<F> = Box_::new(f);
682            connect_raw(
683                self.as_ptr() as *mut _,
684                c"notify::is-site-local".as_ptr() as *const _,
685                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
686                    notify_is_site_local_trampoline::<Self, F> as *const (),
687                )),
688                Box_::into_raw(f),
689            )
690        }
691    }
692}
693
694impl<O: IsA<InetAddress>> InetAddressExt for O {}