hyprstream_core/error/mod.rs
1use std::error::Error;
2use std::fmt;
3
4// Wrapper for tonic::Status
5#[derive(Debug)]
6pub struct StatusWrapper(pub tonic::Status);
7
8impl Error for StatusWrapper {
9 fn source(&self) -> Option<&(dyn Error + 'static)> {
10 Some(&self.0)
11 }
12}
13
14impl fmt::Display for StatusWrapper {
15 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
16 self.0.fmt(f)
17 }
18}