Buffer boilerplate stuff

This commit is contained in:
Greg Shuflin committed 2024-03-11 15:11:22 -07:00
1 parent 310eb326a4
commit f94fe06eb5
1 file changed
+15
+15
View File
@@ -8,6 +8,21 @@ use super::{buffer_settings::BufferSettings, cursor::Cursor};
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub(crate) struct BufferId(pub(crate) usize);
#[derive(Debug)]
pub(crate) enum Buffer {
Text(TextBuffer),
Internal(InternalBuffer),
}
#[derive(Debug)]
pub(crate) struct InternalBuffer {}
// this should be a trait
impl InternalBuffer {
//TODO maybe this can't be str
fn text(&self) -> &str {}
}
#[derive(Debug)]
pub(crate) struct TextBuffer {
pub(crate) text: Rope,