Skip to content

Commit 1713543

Browse files
dannycjonesujinho
authored andcommitted
Add missing documentation for fuser Mount structs (awslabs#1105)
Our fuser fork emits a lot of warnings during builds, impacting our pull requests. This change addresses missing documentation on one struct in fuser (which was introduced by our change in awslabs#1098). This change is a good candidate to be contributed to upstream. Once contributed, this commit can be removed. Relevant issues: N/A No. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the [Developer Certificate of Origin (DCO)](https://developercertificate.org/). --------- Signed-off-by: Daniel Carl Jones <[email protected]>
1 parent e34ef86 commit 1713543

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/mnt/fuse2.rs

+6
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ fn ensure_last_os_error() -> io::Error {
1818
}
1919
}
2020

21+
/// An active FUSE mount.
22+
///
23+
/// This struct manages the lifecycle of the mount, unmounting when dropped.
2124
#[derive(Debug)]
2225
pub struct Mount {
2326
mountpoint: CString,
2427
}
2528
impl Mount {
29+
/// Mounts the filesystem at the given path, with the given options.
30+
///
31+
/// Returns the mounted FUSE file descriptor along with a [Mount] for handling the mount lifecycle.
2632
pub fn new(mountpoint: &Path, options: &[MountOption]) -> io::Result<(Arc<File>, Mount)> {
2733
let mountpoint = CString::new(mountpoint.as_os_str().as_bytes()).unwrap();
2834
with_fuse_args(options, |args| {

src/mnt/fuse3.rs

+6
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,17 @@ fn ensure_last_os_error() -> io::Error {
2222
}
2323
}
2424

25+
/// An active FUSE mount.
26+
///
27+
/// This struct manages the lifecycle of the mount, unmounting and destroying the session when dropped.
2528
#[derive(Debug)]
2629
pub struct Mount {
2730
fuse_session: *mut c_void,
2831
}
2932
impl Mount {
33+
/// Mounts the filesystem at the given path, with the given options.
34+
///
35+
/// Returns the mounted FUSE file descriptor along with a [Mount] for handling the mount lifecycle.
3036
pub fn new(mnt: &Path, options: &[MountOption]) -> io::Result<(Arc<File>, Mount)> {
3137
let mnt = CString::new(mnt.as_os_str().as_bytes()).unwrap();
3238
with_fuse_args(options, |args| {

0 commit comments

Comments
 (0)