zvariant/
signature.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use crate::{Basic, Type};

pub use zvariant_utils::signature::*;

impl From<Error> for crate::Error {
    fn from(e: Error) -> Self {
        crate::Error::SignatureParse(e)
    }
}

impl Type for Signature {
    const SIGNATURE: &'static Signature = &Signature::Signature;
}

impl Basic for Signature {
    const SIGNATURE_CHAR: char = 'g';
    const SIGNATURE_STR: &'static str = "g";
}

impl From<Signature> for crate::Value<'static> {
    fn from(value: Signature) -> Self {
        crate::Value::Signature(value)
    }
}