sea_query_derive/iden/
path.rs1use std::fmt::Display;
2
3#[derive(Debug)]
4pub enum IdenPath {
5 Iden,
6 Method,
7 Rename,
8 Flatten,
9}
10
11impl IdenPath {
12 const fn as_str(&self) -> &'static str {
13 match self {
14 IdenPath::Iden => "iden",
15 IdenPath::Method => "method",
16 IdenPath::Rename => "rename",
17 IdenPath::Flatten => "flatten",
18 }
19 }
20}
21
22impl Display for IdenPath {
23 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24 f.write_str(self.as_str())
25 }
26}
27
28impl PartialEq<IdenPath> for syn::Ident {
29 fn eq(&self, other: &IdenPath) -> bool {
30 self.eq(other.as_str())
31 }
32}