title: Possible to access the 'TypeId' of a struct member?
body: <p>Is there a way to access the <code>TypeId</code> (<code>std::any::TypeId::of::&lt;T&gt;</code>) of a struct member by name?</p>
  
  <p>If I have a basic struct:</p>
  
  <pre><code>MyStruct {
      value: i64,
  }
  </code></pre>
  
  <p>And I only know <code>MyStruct</code> and <code>value</code>, is there a way to access <code>TypeId::of::&lt;i64&gt;</code> - where <code>i64</code> depends on the type of <code>value</code>?</p>
  
  <pre><code>main () {
      assert_eq!(
          TypeId::of::&lt;i64&gt;,
          // ^^^ this works
          type_id_of!(MyStruct, value),
          // ^^^ this is what I'm looking for
      );
  }
  </code></pre>
  
  <hr>
  
  <p>See related question: <a href="https://stackoverflow.com/questions/40573055/is-it-possible-to-access-the-type-of-a-struct-member-for-function-signatures-or">Is it possible to access the type of a struct member for function signatures or declarations?</a></p>