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 options(&self) -> Option<GString>
Available on crate feature v2_58
only.
pub fn options(&self) -> Option<GString>
v2_58
only.Gets a comma separated list of mount options for the Unix mount.
For example: rw,relatime,seclabel,data=ordered
.
This is similar to GioUnix::MountPoint::get_options()
, but it takes
a GioUnix::MountEntry
as an argument.
§Returns
a string containing the options, or NULL
if not
available.
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 a 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 NULL
if not supported
Sourcepub fn guess_can_eject(&self) -> bool
pub fn guess_can_eject(&self) -> bool
Guesses whether a Unix mount entry can be ejected.
§Returns
true if @self is deemed to be ejectable; false otherwise
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 entry.
The result is a translated string.
§Returns
a newly allocated translated string
Sourcepub fn guess_should_display(&self) -> bool
pub fn guess_should_display(&self) -> bool
Guesses whether a Unix mount entry should be displayed in the UI.
§Returns
true if @self is deemed to be displayable; false otherwise
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
is_system_fs_type()
, is_system_device_path()
and
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; false otherwise
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 GioUnix::MountEntry
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
mount_entries_changed_since()
.
If more mounts have the same mount path, the last matching mount is returned.
This will return NULL
if there is no mount point at @mount_path.
§mount_path
path for a possible Unix mount
§Returns
a GioUnix::MountEntry
§time_read
return location for 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 GioUnix::MountEntry
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
mount_entries_changed_since()
.
If more mounts have the same mount path, the last matching mount is returned.
This will return NULL
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 GioUnix::MountEntry
§time_read
return location for 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§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
.