Document structs in fslib

This commit is contained in:
2025-06-26 23:08:13 +10:00
parent d2e06c9a70
commit 6a194e98e8

View File

@@ -98,6 +98,7 @@ impl lb_lsdir_sync {
}
}
/// Entry inside of a directory on the filesystem.
#[derive(Debug, From)]
#[cdef]
pub struct lb_dirent(#[opaque] tokio::fs::DirEntry);
@@ -131,6 +132,7 @@ impl lb_dirent {
}
}
/// Synchronous version of [`lb_dirent`].
#[derive(Debug, From)]
#[cdef]
pub struct lb_dirent_sync(#[opaque] std::fs::DirEntry);
@@ -165,6 +167,7 @@ impl lb_dirent_sync {
}
}
/// Structure representing a type of file with accessors for each file type.
#[derive(Debug, From)]
#[cdef]
pub struct lb_file_type(#[opaque] std::fs::FileType);
@@ -198,6 +201,7 @@ impl lb_file_type {
}
}
/// Metadata information about a file.
#[derive(Debug, From)]
#[cdef]
pub struct lb_file_meta(#[opaque] std::fs::Metadata);
@@ -270,6 +274,7 @@ impl lb_file_meta {
}
}
/// Representation of the various permissions on a file.
#[derive(Debug, From)]
#[cdef]
pub struct lb_file_perms(#[opaque] std::fs::Permissions);