Crate gio

Source
Expand description

§Rust GIO bindings

Rust bindings and wrappers for GIO, part of gtk-rs-core.

GIO 2.56 is the lowest supported version for the underlying library.

§Minimum supported Rust version

Currently, the minimum supported Rust version is 1.70.0.

§Documentation

§Using

We recommend using crates from crates.io, as demonstrated here.

If you want to track the bleeding edge, use the git dependency instead:

[dependencies]
gio = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "gio" }

Avoid mixing versioned and git crates like this:

# This will not compile
[dependencies]
gio = "0.13"
gio = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "gio" }

§See Also

§License

gio is available under the MIT License, please refer to it.

Re-exports§

pub use crate::resource::resources_register_include_impl;
pub use gio_sys as ffi;
pub use glib;
pub use crate::functions::*;

Modules§

builders
functions
prelude
Traits and essential types intended for blanket imports.
subclass

Macros§

resources_register_include
Include gresources generated with glib_build_tools::compile_resources and register with glib. path is relative to OUTDIR.

Structs§

Action
GLib type: GObject with reference counted clone semantics.
ActionEntry
ActionEntryBuilder
ActionGroup
GLib type: GObject with reference counted clone semantics.
ActionGroupExportId
ActionMap
GLib type: GObject with reference counted clone semantics.
AppInfo
GLib type: GObject with reference counted clone semantics.
AppInfoCreateFlags
AppInfoMonitor
GLib type: GObject with reference counted clone semantics.
AppLaunchContext
GLib type: GObject with reference counted clone semantics.
Application
GLib type: GObject with reference counted clone semantics.
ApplicationBusyGuard
ApplicationCommandLine
GLib type: GObject with reference counted clone semantics.
ApplicationFlags
ApplicationHoldGuard
AskPasswordFlags
AsyncInitable
GLib type: GObject with reference counted clone semantics.
AsyncResult
GLib type: GObject with reference counted clone semantics.
BindingBuilder
BufferedInputStream
GLib type: GObject with reference counted clone semantics.
BufferedOutputStream
GLib type: GObject with reference counted clone semantics.
BusNameOwnerFlags
BusNameWatcherFlags
BytesIcon
GLib type: GObject with reference counted clone semantics.
Cancellable
GLib type: GObject with reference counted clone semantics.
CancellableFuture
A future which can be cancelled via Cancellable.
Cancelled
Indicator that the CancellableFuture was cancelled.
CancelledHandlerId
The id of a cancelled handler that is returned by CancellableExtManual::connect. This type is analogous to glib::SignalHandlerId.
CharsetConverter
GLib type: GObject with reference counted clone semantics.
Converter
GLib type: GObject with reference counted clone semantics.
ConverterFlags
ConverterInputStream
GLib type: GObject with reference counted clone semantics.
ConverterOutputStream
GLib type: GObject with reference counted clone semantics.
Credentials
GLib type: GObject with reference counted clone semantics.
DBusActionGroup
GLib type: GObject with reference counted clone semantics.
DBusArgInfo
GLib type: Shared boxed type with reference counted clone semantics.
DBusAuthObserver
GLib type: GObject with reference counted clone semantics.
DBusCallFlags
DBusCapabilityFlags
DBusConnection
GLib type: GObject with reference counted clone semantics.
DBusConnectionFlags
DBusInterface
GLib type: GObject with reference counted clone semantics.
DBusInterfaceInfo
GLib type: Shared boxed type with reference counted clone semantics.
DBusInterfaceSkeleton
GLib type: GObject with reference counted clone semantics.
DBusInterfaceSkeletonFlags
DBusMenuModel
GLib type: GObject with reference counted clone semantics.
DBusMessage
GLib type: GObject with reference counted clone semantics.
DBusMessageFlags
DBusMethodInfo
GLib type: Shared boxed type with reference counted clone semantics.
DBusMethodInvocation
GLib type: GObject with reference counted clone semantics.
DBusNodeInfo
GLib type: Shared boxed type with reference counted clone semantics.
DBusObject
GLib type: GObject with reference counted clone semantics.
DBusObjectManager
GLib type: GObject with reference counted clone semantics.
DBusObjectManagerClientFlags
DBusObjectManagerServer
GLib type: GObject with reference counted clone semantics.
DBusObjectProxy
GLib type: GObject with reference counted clone semantics.
DBusObjectSkeleton
GLib type: GObject with reference counted clone semantics.
DBusPropertyInfo
GLib type: Shared boxed type with reference counted clone semantics.
DBusPropertyInfoFlags
DBusProxy
GLib type: GObject with reference counted clone semantics.
DBusProxyFlags
DBusSendMessageFlags
DBusServer
GLib type: GObject with reference counted clone semantics.
DBusServerFlags
DBusSignalFlags
DBusSignalInfo
GLib type: Shared boxed type with reference counted clone semantics.
DBusSubtreeFlags
DataInputStream
GLib type: GObject with reference counted clone semantics.
DataOutputStream
GLib type: GObject with reference counted clone semantics.
DatagramBased
GLib type: GObject with reference counted clone semantics.
DebugControllerv2_72
GLib type: GObject with reference counted clone semantics.
DebugControllerDBusv2_72
GLib type: GObject with reference counted clone semantics.
Drive
GLib type: GObject with reference counted clone semantics.
DriveStartFlags
DtlsClientConnection
GLib type: GObject with reference counted clone semantics.
DtlsConnection
GLib type: GObject with reference counted clone semantics.
DtlsServerConnection
GLib type: GObject with reference counted clone semantics.
Emblem
GLib type: GObject with reference counted clone semantics.
EmblemedIcon
GLib type: GObject with reference counted clone semantics.
File
GLib type: GObject with reference counted clone semantics.
FileAttributeInfo
GLib type: Inline allocated boxed type with stack copy semantics.
FileAttributeInfoFlags
FileAttributeInfoList
GLib type: Shared boxed type with reference counted clone semantics.
FileAttributeMatcher
GLib type: Shared boxed type with reference counted clone semantics.
FileAttributematcherIter
FileCopyFlags
FileCreateFlags
FileEnumerator
GLib type: GObject with reference counted clone semantics.
FileEnumeratorStream
A Stream used to enumerate files in directories.
FileIOStream
GLib type: GObject with reference counted clone semantics.
FileIcon
GLib type: GObject with reference counted clone semantics.
FileInfo
GLib type: GObject with reference counted clone semantics.
FileInputStream
GLib type: GObject with reference counted clone semantics.
FileMeasureFlags
FileMonitor
GLib type: GObject with reference counted clone semantics.
FileMonitorFlags
FileOutputStream
GLib type: GObject with reference counted clone semantics.
FileQueryInfoFlags
FilenameCompleter
GLib type: GObject with reference counted clone semantics.
FilterId
FilterInputStream
GLib type: GObject with reference counted clone semantics.
FilterOutputStream
GLib type: GObject with reference counted clone semantics.
GioFuture
GioFutureResult
IOExtension
The implementation of an IOExtensionPoint.
IOExtensionPoint
An extension point provides a mechanism to extend the functionality of a library or application. Each extension point is identified by a name, and it may optionally require that any implementation must be of a certain type.
IOExtensionPointBuilder
Builder for extension points.
IOStream
GLib type: GObject with reference counted clone semantics.
IOStreamAsyncReadWrite
IOStreamSpliceFlags
Icon
GLib type: GObject with reference counted clone semantics.
InetAddress
GLib type: GObject with reference counted clone semantics.
InetAddressMask
GLib type: GObject with reference counted clone semantics.
InetSocketAddress
GLib type: GObject with reference counted clone semantics.
Initable
GLib type: GObject with reference counted clone semantics.
InputMessage
InputStream
GLib type: GObject with reference counted clone semantics.
InputStreamAsyncBufRead
InputStreamAsyncRead
InputStreamRead
InputVector
JoinHandle
A handle to a task running on the I/O thread pool.
ListModel
GLib type: GObject with reference counted clone semantics.
ListStore
GLib type: GObject with reference counted clone semantics.
LoadableIcon
GLib type: GObject with reference counted clone semantics.
LocalTask
LocalTask provides idiomatic access to gio’s GTask API, for instance by being generic over their value type, while not completely departing from the underlying C API. LocalTask does not require its value to be Send and Sync and thus is useful to to implement gio style asynchronous tasks that run in the glib main loop. If you need to run tasks in threads see the Task type.
MemoryInputStream
GLib type: GObject with reference counted clone semantics.
MemoryMonitorv2_64
GLib type: GObject with reference counted clone semantics.
MemoryOutputStream
GLib type: GObject with reference counted clone semantics.
Menu
GLib type: GObject with reference counted clone semantics.
MenuAttributeIter
GLib type: GObject with reference counted clone semantics.
MenuItem
GLib type: GObject with reference counted clone semantics.
MenuLinkIter
GLib type: GObject with reference counted clone semantics.
MenuModel
GLib type: GObject with reference counted clone semantics.
MenuModelExportId
Mount
GLib type: GObject with reference counted clone semantics.
MountMountFlags
MountOperation
GLib type: GObject with reference counted clone semantics.
MountUnmountFlags
NativeSocketAddress
GLib type: GObject with reference counted clone semantics.
NativeVolumeMonitor
GLib type: GObject with reference counted clone semantics.
NetworkAddress
GLib type: GObject with reference counted clone semantics.
NetworkMonitor
GLib type: GObject with reference counted clone semantics.
NetworkService
GLib type: GObject with reference counted clone semantics.
Notification
GLib type: GObject with reference counted clone semantics.
OutputMessage
OutputStream
GLib type: GObject with reference counted clone semantics.
OutputStreamAsyncWrite
OutputStreamSpliceFlags
OutputStreamWrite
OutputVector
OwnerId
Permission
GLib type: GObject with reference counted clone semantics.
PollableInputStream
GLib type: GObject with reference counted clone semantics.
PollableOutputStream
GLib type: GObject with reference counted clone semantics.
PowerProfileMonitorv2_70
GLib type: GObject with reference counted clone semantics.
PropertyAction
GLib type: GObject with reference counted clone semantics.
Proxy
GLib type: GObject with reference counted clone semantics.
ProxyAddress
GLib type: GObject with reference counted clone semantics.
ProxyAddressEnumerator
GLib type: GObject with reference counted clone semantics.
ProxyResolver
GLib type: GObject with reference counted clone semantics.
ReadInputStream
GLib type: GObject with reference counted clone semantics.
RegistrationBuilder
Build a registered DBus object, by handling different parts of DBus.
RegistrationId
RemoteActionGroup
GLib type: GObject with reference counted clone semantics.
Resolver
GLib type: GObject with reference counted clone semantics.
ResolverNameLookupFlagsv2_60
Resource
GLib type: Shared boxed type with reference counted clone semantics.
ResourceFlags
ResourceLookupFlags
Seekable
GLib type: GObject with reference counted clone semantics.
Settings
GLib type: GObject with reference counted clone semantics.
SettingsBackend
GLib type: GObject with reference counted clone semantics.
SettingsBindFlags
SettingsSchema
GLib type: Shared boxed type with reference counted clone semantics.
SettingsSchemaKey
GLib type: Shared boxed type with reference counted clone semantics.
SettingsSchemaSource
GLib type: Shared boxed type with reference counted clone semantics.
SignalSubscriptionId
SimpleAction
GLib type: GObject with reference counted clone semantics.
SimpleActionGroup
GLib type: GObject with reference counted clone semantics.
SimpleIOStream
GLib type: GObject with reference counted clone semantics.
SimplePermission
GLib type: GObject with reference counted clone semantics.
SimpleProxyResolver
GLib type: GObject with reference counted clone semantics.
Socket
GLib type: GObject with reference counted clone semantics.
SocketAddress
GLib type: GObject with reference counted clone semantics.
SocketAddressEnumerator
GLib type: GObject with reference counted clone semantics.
SocketClient
GLib type: GObject with reference counted clone semantics.
SocketConnectable
GLib type: GObject with reference counted clone semantics.
SocketConnection
GLib type: GObject with reference counted clone semantics.
SocketControlMessage
GLib type: GObject with reference counted clone semantics.
SocketControlMessages
SocketListener
GLib type: GObject with reference counted clone semantics.
SocketMsgFlags
SocketService
GLib type: GObject with reference counted clone semantics.
SrvTarget
GLib type: Boxed type with copy-on-clone semantics.
Subprocess
GLib type: GObject with reference counted clone semantics.
SubprocessFlags
SubprocessLauncher
GLib type: GObject with reference counted clone semantics.
Task
Task provides idiomatic access to gio’s GTask API, for instance by being generic over their value type, while not completely departing from the underlying C API. Task is Send and Sync and requires its value to also be Send and Sync, thus is useful to to implement gio style asynchronous tasks that run in threads. If you need to only run tasks in glib main loop see the LocalTask type.
TcpConnection
GLib type: GObject with reference counted clone semantics.
TcpWrapperConnection
GLib type: GObject with reference counted clone semantics.
TestDBus
GLib type: GObject with reference counted clone semantics.
TestDBusFlags
ThemedIcon
GLib type: GObject with reference counted clone semantics.
ThreadedSocketService
GLib type: GObject with reference counted clone semantics.
TlsBackend
GLib type: GObject with reference counted clone semantics.
TlsCertificate
GLib type: GObject with reference counted clone semantics.
TlsCertificateFlags
TlsClientConnection
GLib type: GObject with reference counted clone semantics.
TlsConnection
GLib type: GObject with reference counted clone semantics.
TlsDatabase
GLib type: GObject with reference counted clone semantics.
TlsDatabaseVerifyFlags
TlsFileDatabase
GLib type: GObject with reference counted clone semantics.
TlsInteraction
GLib type: GObject with reference counted clone semantics.
TlsPassword
GLib type: GObject with reference counted clone semantics.
TlsPasswordFlags
TlsServerConnection
GLib type: GObject with reference counted clone semantics.
Vfs
GLib type: GObject with reference counted clone semantics.
Volume
GLib type: GObject with reference counted clone semantics.
VolumeMonitor
GLib type: GObject with reference counted clone semantics.
WatcherId
Win32InputStream
GLib type: GObject with reference counted clone semantics.
Win32OutputStream
GLib type: GObject with reference counted clone semantics.
WriteOutputStream
GLib type: GObject with reference counted clone semantics.
ZlibCompressor
GLib type: GObject with reference counted clone semantics.
ZlibDecompressor
GLib type: GObject with reference counted clone semantics.

Enums§

BusType
ConverterResult
CredentialsType
DBusError
DBusMessageByteOrder
DBusMessageHeaderField
DBusMessageType
DataStreamByteOrder
DataStreamNewlineType
DriveStartStopType
EmblemOrigin
FileAttributeStatus
FileAttributeType
FileMonitorEvent
FileType
FilesystemPreviewType
IOErrorEnum
IOModuleScopeFlags
InetAddressBytes
MemoryMonitorWarningLevelv2_64
MountOperationResult
NetworkConnectivity
NotificationPriority
PasswordSave
PollableReturnv2_60
ResolverError
ResolverRecordType
ResourceError
SocketClientEvent
SocketFamily
SocketListenerEvent
SocketProtocol
SocketType
TlsAuthenticationMode
TlsCertificateRequestFlags
TlsChannelBindingErrorv2_66
TlsChannelBindingTypev2_66
TlsDatabaseLookupFlags
TlsError
TlsInteractionResult
TlsProtocolVersionv2_70
TlsRehandshakeModeDeprecated
ZlibCompressorFormat

Statics§

DEBUG_CONTROLLER_EXTENSION_POINT_NAMEv2_72
DRIVE_IDENTIFIER_KIND_UNIX_DEVICEv2_58
FILE_ATTRIBUTE_ACCESS_CAN_DELETE
FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE
FILE_ATTRIBUTE_ACCESS_CAN_READ
FILE_ATTRIBUTE_ACCESS_CAN_RENAME
FILE_ATTRIBUTE_ACCESS_CAN_TRASH
FILE_ATTRIBUTE_ACCESS_CAN_WRITE
FILE_ATTRIBUTE_DOS_IS_ARCHIVE
FILE_ATTRIBUTE_DOS_IS_MOUNTPOINTv2_60
FILE_ATTRIBUTE_DOS_IS_SYSTEM
FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAGv2_60
FILE_ATTRIBUTE_ETAG_VALUE
FILE_ATTRIBUTE_FILESYSTEM_FREE
FILE_ATTRIBUTE_FILESYSTEM_READONLY
FILE_ATTRIBUTE_FILESYSTEM_REMOTE
FILE_ATTRIBUTE_FILESYSTEM_SIZE
FILE_ATTRIBUTE_FILESYSTEM_TYPE
FILE_ATTRIBUTE_FILESYSTEM_USED
FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW
FILE_ATTRIBUTE_GVFS_BACKEND
FILE_ATTRIBUTE_ID_FILE
FILE_ATTRIBUTE_ID_FILESYSTEM
FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT
FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT
FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL
FILE_ATTRIBUTE_MOUNTABLE_CAN_START
FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED
FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP
FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT
FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI
FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC
FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE
FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE
FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE
FILE_ATTRIBUTE_OWNER_GROUP
FILE_ATTRIBUTE_OWNER_USER
FILE_ATTRIBUTE_OWNER_USER_REAL
FILE_ATTRIBUTE_PREVIEW_ICON
FILE_ATTRIBUTE_RECENT_MODIFIED
FILE_ATTRIBUTE_SELINUX_CONTEXT
FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE
FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE
FILE_ATTRIBUTE_STANDARD_COPY_NAME
FILE_ATTRIBUTE_STANDARD_DESCRIPTION
FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
FILE_ATTRIBUTE_STANDARD_EDIT_NAME
FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE
FILE_ATTRIBUTE_STANDARD_ICON
FILE_ATTRIBUTE_STANDARD_IS_BACKUP
FILE_ATTRIBUTE_STANDARD_IS_HIDDEN
FILE_ATTRIBUTE_STANDARD_IS_SYMLINK
FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL
FILE_ATTRIBUTE_STANDARD_IS_VOLATILE
FILE_ATTRIBUTE_STANDARD_NAME
FILE_ATTRIBUTE_STANDARD_SIZE
FILE_ATTRIBUTE_STANDARD_SORT_ORDER
FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON
FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET
FILE_ATTRIBUTE_STANDARD_TARGET_URI
FILE_ATTRIBUTE_STANDARD_TYPE
FILE_ATTRIBUTE_THUMBNAILING_FAILED
FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGEv2_76
FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMALv2_76
FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGEv2_76
FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGEv2_76
FILE_ATTRIBUTE_THUMBNAIL_IS_VALID
FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_LARGEv2_76
FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_NORMALv2_76
FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XLARGEv2_76
FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XXLARGEv2_76
FILE_ATTRIBUTE_THUMBNAIL_PATH
FILE_ATTRIBUTE_THUMBNAIL_PATH_LARGEv2_76
FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMALv2_76
FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGEv2_76
FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGEv2_76
FILE_ATTRIBUTE_TIME_ACCESS
FILE_ATTRIBUTE_TIME_ACCESS_NSECv2_74
FILE_ATTRIBUTE_TIME_ACCESS_USEC
FILE_ATTRIBUTE_TIME_CHANGED
FILE_ATTRIBUTE_TIME_CHANGED_NSECv2_74
FILE_ATTRIBUTE_TIME_CHANGED_USEC
FILE_ATTRIBUTE_TIME_CREATED
FILE_ATTRIBUTE_TIME_CREATED_NSECv2_74
FILE_ATTRIBUTE_TIME_CREATED_USEC
FILE_ATTRIBUTE_TIME_MODIFIED
FILE_ATTRIBUTE_TIME_MODIFIED_NSECv2_74
FILE_ATTRIBUTE_TIME_MODIFIED_USEC
FILE_ATTRIBUTE_TRASH_DELETION_DATE
FILE_ATTRIBUTE_TRASH_ITEM_COUNT
FILE_ATTRIBUTE_TRASH_ORIG_PATH
FILE_ATTRIBUTE_UNIX_BLOCKS
FILE_ATTRIBUTE_UNIX_BLOCK_SIZE
FILE_ATTRIBUTE_UNIX_DEVICE
FILE_ATTRIBUTE_UNIX_GID
FILE_ATTRIBUTE_UNIX_INODE
FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT
FILE_ATTRIBUTE_UNIX_MODE
FILE_ATTRIBUTE_UNIX_NLINK
FILE_ATTRIBUTE_UNIX_RDEV
FILE_ATTRIBUTE_UNIX_UID
MEMORY_MONITOR_EXTENSION_POINT_NAMEv2_64
MENU_ATTRIBUTE_ACTION
MENU_ATTRIBUTE_ACTION_NAMESPACE
MENU_ATTRIBUTE_ICON
MENU_ATTRIBUTE_LABEL
MENU_ATTRIBUTE_TARGET
MENU_LINK_SECTION
MENU_LINK_SUBMENU
NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME
NETWORK_MONITOR_EXTENSION_POINT_NAME
POWER_PROFILE_MONITOR_EXTENSION_POINT_NAMEv2_70
PROXY_EXTENSION_POINT_NAME
PROXY_RESOLVER_EXTENSION_POINT_NAME
SETTINGS_BACKEND_EXTENSION_POINT_NAME
TLS_BACKEND_EXTENSION_POINT_NAME
TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT
TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER
VFS_EXTENSION_POINT_NAME
VOLUME_IDENTIFIER_KIND_CLASS
VOLUME_IDENTIFIER_KIND_HAL_UDIDeprecated
VOLUME_IDENTIFIER_KIND_LABEL
VOLUME_IDENTIFIER_KIND_NFS_MOUNT
VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
VOLUME_IDENTIFIER_KIND_UUID
VOLUME_MONITOR_EXTENSION_POINT_NAME

Functions§

bus_own_name
bus_own_name_on_connection
bus_unown_name
bus_unwatch_name
bus_watch_name
bus_watch_name_on_connection
spawn_blocking
Runs a blocking I/O task on the I/O thread pool.