create separated module for meta struct (according to development protocol)

This commit is contained in:
yggverse 2024-09-25 23:07:55 +03:00
parent 4608d96eff
commit 2ac2f60041
2 changed files with 29 additions and 18 deletions

View file

@ -0,0 +1,26 @@
use gtk::glib::GString;
use std::cell::RefCell;
pub enum Mime {
Undefined,
TextGemini,
TextPlain,
}
pub struct Meta {
pub title: GString,
pub description: GString,
pub mime: Mime,
pub progress_fraction: f32,
}
impl Meta {
pub fn new() -> RefCell<Meta> {
RefCell::new(Self {
title: GString::new(),
description: GString::new(),
mime: Mime::Undefined,
progress_fraction: 0.0,
})
}
}