egui_tracing 0.3.0

Integrates tracing and logging with egui for event collection/visualization
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use unicode_segmentation::UnicodeSegmentation;

pub trait Ellipse {
    fn truncate_graphemes(&self, len: usize) -> String;
}

impl Ellipse for String {
    fn truncate_graphemes(&self, len: usize) -> String {
        if self.len() <= len {
            return self.clone();
        }

        let mut truncated: String = self.graphemes(true).take(len).collect();
        truncated.push_str("...");

        truncated
    }
}