sea-query 1.0.0

🔱 A dynamic query builder for MySQL, Postgres and SQLite
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

type_to_value!(MacAddress, MacAddress, MacAddr);

impl Value {
    pub fn is_mac_address(&self) -> bool {
        matches!(self, Self::MacAddress(_))
    }

    pub fn as_ref_mac_address(&self) -> Option<&MacAddress> {
        match self {
            Self::MacAddress(v) => v.as_ref(),
            _ => panic!("not Value::MacAddress"),
        }
    }
}