title: implementation of Serde::Deserialize is not general enough
body: <p>I'm using <a href="https://docs.rs/event-emitter-rs/0.1.4/event_emitter_rs/index.html" rel="nofollow noreferrer">event_emmiter_rs</a> for event handling in my app. This library allows you to subscribe to events with callbacks and also fire those events. Events are in the form of (strings, value) and callbacks are in the form of closures that take in a value parameter. Values sent through the event callbacks must implement Serde::Deserialize. <a href="https://docs.rs/event-emitter-rs/0.1.4/event_emitter_rs/struct.EventEmitter.html" rel="nofollow noreferrer">We can see this here in the docs</a>. So I created this simple setup:</p>
  <pre class="lang-rust prettyprint-override"><code>use event_emitter_rs::EventEmitter;
  use serde::Serialize;
  use serde::Deserialize;
  use std::borrow::Cow;
  
  #[derive(Clone, Serialize, Deserialize, Debug)]
  #[serde(bound(deserialize = &quot;'de: 'static&quot;))]
  //#[serde(bound(deserialize = &quot;'de: 'a&quot;))] using the 'a lifetime gives same error
  pub struct DraggableInfo&lt;'a&gt;{
      parent: WidgetValue&lt;'a&gt;,
      index: WidgetValue&lt;'a&gt;,
      draggable_id: WidgetValue&lt;'a&gt;,
  }
  
  impl&lt;'a&gt; DraggableInfo&lt;'a&gt;{
      pub fn new(parent: &amp;'static str, index: u32, draggable_id: &amp;'static str)-&gt;Self{
          DraggableInfo{
              parent: WidgetValue::CString(Cow::Borrowed(parent)),
              index: WidgetValue::Unsized32(index),
              draggable_id: WidgetValue::CString(Cow::Borrowed(draggable_id)),
          }
      }
  }
  
  #[derive(Clone, Serialize, Deserialize, Debug)]
  pub enum WidgetValue&lt;'a&gt;{
      Integer32(i32),
      Unsized32(u32),
      CString(Cow&lt;'a, str&gt;)
  }
  
  fn main(){
      let mut event_emitter = EventEmitter::new();
      event_emitter.on(&quot;Print Draggable Value&quot;, |dragValue: DraggableInfo| {dbg!(dragValue);});
      event_emitter.emit(&quot;Print Draggable Value&quot;, DraggableInfo::new(&quot;root&quot;, 0, &quot;layer 1&quot;)); 
  }
  
  </code></pre>
  <p>But this results in error message:</p>
  <pre><code>error: implementation of `Deserialize` is not general enough
    --&gt; src\main.rs:34:19
     |
  34 |     event_emitter.on(&quot;Print Draggable Value&quot;, |dragValue: DraggableInfo| {dbg!(dragValue);});
     |                   ^^ implementation of `Deserialize` is not general enough
     |
     = note: `DraggableInfo&lt;'_&gt;` must implement `Deserialize&lt;'0&gt;`, for any lifetime `'0`...
     = note: ...but `DraggableInfo&lt;'_&gt;` actually implements `Deserialize&lt;'1&gt;`, for some specific lifetime `'1`
  
  </code></pre>
  <p>I'm not sure what the <code>Deserialize&lt;'0&gt;</code> and <code>Deserialize&lt;'1&gt;</code> lifetimes the message refers to are, or exactly what the compiler means when it says the impl is &quot;too general&quot;. How might I fix this error?</p>