@@ -17,50 +17,6 @@ use std::marker::PhantomData;
1717use  std:: str:: FromStr ; 
1818use  tinybytes:: { Bytes ,  BytesString } ; 
1919
20- #[ derive( Debug ,  PartialEq ) ]  
21- pub  enum  SpanKey  { 
22-     Service , 
23-     Name , 
24-     Resource , 
25-     TraceId , 
26-     SpanId , 
27-     ParentId , 
28-     Start , 
29-     Duration , 
30-     Error , 
31-     Meta , 
32-     Metrics , 
33-     Type , 
34-     MetaStruct , 
35-     SpanLinks , 
36-     SpanEvents , 
37- } 
38- 
39- impl  FromStr  for  SpanKey  { 
40-     type  Err  = SpanKeyParseError ; 
41- 
42-     fn  from_str ( s :  & str )  -> Result < Self ,  Self :: Err >  { 
43-         match  s { 
44-             "service"  => Ok ( SpanKey :: Service ) , 
45-             "name"  => Ok ( SpanKey :: Name ) , 
46-             "resource"  => Ok ( SpanKey :: Resource ) , 
47-             "trace_id"  => Ok ( SpanKey :: TraceId ) , 
48-             "span_id"  => Ok ( SpanKey :: SpanId ) , 
49-             "parent_id"  => Ok ( SpanKey :: ParentId ) , 
50-             "start"  => Ok ( SpanKey :: Start ) , 
51-             "duration"  => Ok ( SpanKey :: Duration ) , 
52-             "error"  => Ok ( SpanKey :: Error ) , 
53-             "meta"  => Ok ( SpanKey :: Meta ) , 
54-             "metrics"  => Ok ( SpanKey :: Metrics ) , 
55-             "type"  => Ok ( SpanKey :: Type ) , 
56-             "meta_struct"  => Ok ( SpanKey :: MetaStruct ) , 
57-             "span_links"  => Ok ( SpanKey :: SpanLinks ) , 
58-             "span_events"  => Ok ( SpanKey :: SpanEvents ) , 
59-             _ => Err ( SpanKeyParseError :: new ( format ! ( "Invalid span key: {s}" ) ) ) , 
60-         } 
61-     } 
62- } 
63- 
6420/// Trait representing the requirements for a type to be used as a Span "string" type. 
6521/// Note: Borrow<str> is not required by the derived traits, but allows to access HashMap elements 
6622/// from a static str and check if the string is empty. 
0 commit comments