Add file rotation introspection helpers

This commit is contained in:
Nanaloveyuki
2026-05-10 12:42:36 +08:00
parent b68ba073b4
commit 14eaf9e178
8 changed files with 72 additions and 3 deletions
+8
View File
@@ -126,6 +126,14 @@ pub fn FileSink::auto_flush_enabled(self : FileSink) -> Bool {
self.auto_flush
}
pub fn FileSink::rotation_enabled(self : FileSink) -> Bool {
self.rotation is Some(_)
}
pub fn FileSink::rotation_config(self : FileSink) -> FileRotation? {
self.rotation
}
pub fn FileSink::close(self : FileSink) -> Bool {
match self.handle.val {
None => false