static-text: add new utility
This commit is contained in:
parent
8f57f72d14
commit
97f7b68369
10 changed files with 150 additions and 15 deletions
|
|
@ -15,7 +15,7 @@ use {
|
|||
state::State,
|
||||
theme::Color,
|
||||
tree::{Node, OutputNode, Transform},
|
||||
utils::{clonecell::UnsafeCellCloneSafe, errorfmt::ErrorFmt},
|
||||
utils::{clonecell::UnsafeCellCloneSafe, errorfmt::ErrorFmt, static_text::StaticText},
|
||||
video::{
|
||||
Modifier,
|
||||
dmabuf::DmaBuf,
|
||||
|
|
@ -47,6 +47,12 @@ pub enum GfxApi {
|
|||
Vulkan,
|
||||
}
|
||||
|
||||
impl StaticText for GfxApi {
|
||||
fn text(&self) -> &'static str {
|
||||
self.to_str()
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<ConfigGfxApi> for GfxApi {
|
||||
type Error = ();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue