title: Return Mutable Rust struct from Ruby FFI struct
body: <p>I am trying to passing in a FFI struct into rust from a Ruby module, mutating the struct and passing back the struct to the ruby module.</p>
  
  <p>What is the proper way to handle the lifetime in this scenario?</p>
  
  <p>I am running into an lifetime error:</p>
  
  <pre><code>src/lib.rs:20:55: 20:70 error: missing lifetime specifier [E0106]
  src/lib.rs:20 pub extern fn add_one_to_vals(numbers: TwoNumbers) -&gt; &amp;mut TwoNumbers {
                                                                      ^~~~~~~~~~~~~~~
  src/lib.rs:20:55: 20:70 help: run `rustc --explain E0106` to see a detailed explanation
  src/lib.rs:20:55: 20:70 help: this function's return type contains a borrowed value, but the signature does not say which one of `numbers`'s 0 elided lifetimes it is borrowed from
  </code></pre>
  
  <p>Rust code:</p>
  
  <pre><code>pub struct TwoNumbers {
      first: i32,
      second: i32,
  }
  
  impl TwoNumbers {
      fn plus_one_to_each(&amp;mut self) -&gt; &amp;mut TwoNumbers {
          self.first = self.first + 1;
          self.first = self.second + 1;
          self
      }
  }
  
  #[no_mangle]
  pub extern fn add_one_to_vals(numbers: TwoNumbers) -&gt; &amp;mut TwoNumbers {
     numbers.plus_one_to_each()
  }
  </code></pre>