gio/auto/
socket_connectable.rs1use crate::{ffi, SocketAddressEnumerator};
6use glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9 #[doc(alias = "GSocketConnectable")]
10 pub struct SocketConnectable(Interface<ffi::GSocketConnectable, ffi::GSocketConnectableIface>);
11
12 match fn {
13 type_ => || ffi::g_socket_connectable_get_type(),
14 }
15}
16
17impl SocketConnectable {
18 pub const NONE: Option<&'static SocketConnectable> = None;
19}
20
21pub trait SocketConnectableExt: IsA<SocketConnectable> + 'static {
22 #[doc(alias = "g_socket_connectable_enumerate")]
23 fn enumerate(&self) -> SocketAddressEnumerator {
24 unsafe {
25 from_glib_full(ffi::g_socket_connectable_enumerate(
26 self.as_ref().to_glib_none().0,
27 ))
28 }
29 }
30
31 #[doc(alias = "g_socket_connectable_proxy_enumerate")]
32 fn proxy_enumerate(&self) -> SocketAddressEnumerator {
33 unsafe {
34 from_glib_full(ffi::g_socket_connectable_proxy_enumerate(
35 self.as_ref().to_glib_none().0,
36 ))
37 }
38 }
39
40 #[doc(alias = "g_socket_connectable_to_string")]
41 fn to_string(&self) -> glib::GString {
42 unsafe {
43 from_glib_full(ffi::g_socket_connectable_to_string(
44 self.as_ref().to_glib_none().0,
45 ))
46 }
47 }
48}
49
50impl<O: IsA<SocketConnectable>> SocketConnectableExt for O {}