#[derive(Debug, Clone, Copy, Default)]
pub struct BufferFileKind {
large_file: bool,
line_feeds_scanned: bool,
is_binary: bool,
}
impl BufferFileKind {
pub fn new(large_file: bool, is_binary: bool) -> Self {
Self {
large_file,
line_feeds_scanned: false,
is_binary,
}
}
pub fn is_large_file(&self) -> bool {
self.large_file
}
pub fn has_line_feed_scan(&self) -> bool {
self.line_feeds_scanned
}
pub fn is_binary(&self) -> bool {
self.is_binary
}
pub(super) fn set_large_file(&mut self, v: bool) {
self.large_file = v;
}
pub(super) fn mark_line_feed_scan_complete(&mut self) {
self.line_feeds_scanned = true;
}
pub(super) fn set_binary(&mut self, v: bool) {
self.is_binary = v;
}
}