mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
use optionals, remove undefined enums
This commit is contained in:
parent
11b9dc94d3
commit
b3c7545717
6 changed files with 52 additions and 47 deletions
|
|
@ -1,24 +1,23 @@
|
|||
use gtk::glib::GString;
|
||||
|
||||
pub enum Mime {
|
||||
Undefined,
|
||||
TextGemini,
|
||||
TextPlain,
|
||||
}
|
||||
|
||||
pub struct Meta {
|
||||
pub title: GString,
|
||||
pub description: GString,
|
||||
pub mime: Mime,
|
||||
pub title: Option<GString>,
|
||||
pub description: Option<GString>,
|
||||
pub mime: Option<Mime>,
|
||||
pub progress_fraction: f32,
|
||||
}
|
||||
|
||||
impl Meta {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
title: GString::new(),
|
||||
description: GString::new(),
|
||||
mime: Mime::Undefined,
|
||||
title: None,
|
||||
description: None,
|
||||
mime: None,
|
||||
progress_fraction: 0.0,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue