pub struct UnixMountEntry { /* private fields */ }
Expand description
Defines a Unix mount entry (e.g. /media/cdrom
).
This corresponds roughly to a mtab entry.
GLib type: Boxed type with copy-on-clone semantics.
Implementations§
Source§impl UnixMountEntry
impl UnixMountEntry
pub fn mounts() -> (Vec<UnixMountEntry>, u64)
pub fn mounts_from_file( table_path: impl AsRef<Path>, ) -> (Vec<UnixMountEntry>, u64)
v2_82
only.pub fn unix_mount_get_mount_path(&self) -> PathBuf
mount_path()
pub fn is_changed_since(time: u64) -> bool
Source§impl UnixMountEntry
impl UnixMountEntry
Sourcepub fn as_ptr(&self) -> *mut GUnixMountEntry
pub fn as_ptr(&self) -> *mut GUnixMountEntry
Return the inner pointer to the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut GUnixMountEntry) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut GUnixMountEntry) -> &Self
Borrows the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow_mut(
ptr: &mut *mut GUnixMountEntry,
) -> &mut Self
pub unsafe fn from_glib_ptr_borrow_mut( ptr: &mut *mut GUnixMountEntry, ) -> &mut Self
Borrows the underlying C value mutably.
Source§impl UnixMountEntry
impl UnixMountEntry
Sourcepub fn device_path(&self) -> PathBuf
pub fn device_path(&self) -> PathBuf
Sourcepub fn mount_path(&self) -> PathBuf
pub fn mount_path(&self) -> PathBuf
Sourcepub fn root_path(&self) -> Option<GString>
Available on crate feature v2_60
only.
pub fn root_path(&self) -> Option<GString>
v2_60
only.Gets the root of the mount within the filesystem. This is useful e.g. for mounts created by bind operation, or btrfs subvolumes.
For example, the root path is equal to “/” for mount created by “mount /dev/sda1 /mnt/foo” and “/bar” for “mount –bind /mnt/foo/bar /mnt/bar”.
§Returns
a string containing the root, or None
if not supported.
Sourcepub fn guess_can_eject(&self) -> bool
pub fn guess_can_eject(&self) -> bool
Sourcepub fn guess_icon(&self) -> Icon
pub fn guess_icon(&self) -> Icon
Sourcepub fn guess_name(&self) -> GString
pub fn guess_name(&self) -> GString
Guesses the name of a Unix mount. The result is a translated string.
§Returns
A newly allocated string that must be freed with g_free()
Sourcepub fn guess_should_display(&self) -> bool
pub fn guess_should_display(&self) -> bool
Sourcepub fn guess_symbolic_icon(&self) -> Icon
pub fn guess_symbolic_icon(&self) -> Icon
Sourcepub fn is_readonly(&self) -> bool
pub fn is_readonly(&self) -> bool
Sourcepub fn is_system_internal(&self) -> bool
pub fn is_system_internal(&self) -> bool
Checks if a Unix mount is a system mount. This is the Boolean OR of g_unix_is_system_fs_type(), g_unix_is_system_device_path() and g_unix_is_mount_path_system_internal() on @self’s properties.
The definition of what a ‘system’ mount entry is may change over time as new file system types and device paths are ignored.
§Returns
true
if the unix mount is for a system path.
Sourcepub fn for_mount_path(
mount_path: impl AsRef<Path>,
) -> (Option<UnixMountEntry>, u64)
pub fn for_mount_path( mount_path: impl AsRef<Path>, ) -> (Option<UnixMountEntry>, u64)
Gets a #GUnixMountEntry for a given mount path. If @time_read is set, it will be filled with a unix timestamp for checking if the mounts have changed since with g_unix_mount_entries_changed_since().
If more mounts have the same mount path, the last matching mount is returned.
This will return None
if there is no mount point at @mount_path.
§mount_path
path for a possible unix mount.
§Returns
a #GUnixMountEntry.
§time_read
guint64 to contain a timestamp.
Sourcepub fn for_file_path(
file_path: impl AsRef<Path>,
) -> (Option<UnixMountEntry>, u64)
pub fn for_file_path( file_path: impl AsRef<Path>, ) -> (Option<UnixMountEntry>, u64)
Gets a #GUnixMountEntry for a given file path. If @time_read is set, it will be filled with a unix timestamp for checking if the mounts have changed since with g_unix_mount_entries_changed_since().
If more mounts have the same mount path, the last matching mount is returned.
This will return None
if looking up the mount entry fails, if
@file_path doesn’t exist or there is an I/O error.
§file_path
file path on some unix mount.
§Returns
a #GUnixMountEntry.
§time_read
guint64 to contain a timestamp.
Trait Implementations§
Source§impl Clone for UnixMountEntry
impl Clone for UnixMountEntry
Source§impl Debug for UnixMountEntry
impl Debug for UnixMountEntry
Source§impl From<UnixMountEntry> for Value
impl From<UnixMountEntry> for Value
Source§fn from(o: UnixMountEntry) -> Self
fn from(o: UnixMountEntry) -> Self
Source§impl HasParamSpec for UnixMountEntry
impl HasParamSpec for UnixMountEntry
type ParamSpec = ParamSpecBoxed
Source§type SetValue = UnixMountEntry
type SetValue = UnixMountEntry
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, UnixMountEntry>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Ord for UnixMountEntry
impl Ord for UnixMountEntry
Source§impl PartialEq for UnixMountEntry
impl PartialEq for UnixMountEntry
Source§impl PartialOrd for UnixMountEntry
impl PartialOrd for UnixMountEntry
Source§impl StaticType for UnixMountEntry
impl StaticType for UnixMountEntry
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for UnixMountEntry
impl Send for UnixMountEntry
impl Sync for UnixMountEntry
Auto Trait Implementations§
impl Freeze for UnixMountEntry
impl RefUnwindSafe for UnixMountEntry
impl Unpin for UnixMountEntry
impl UnwindSafe for UnixMountEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
Source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
Source§fn ensure_type()
fn ensure_type()
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.