[rust-dev] A question about using condition
graydon at mozilla.com
Mon Mar 11 20:31:19 PDT 2013
On 11/03/2013 5:57 PM, 손영수 wrote:
> I have a question about using condition.
> I'd like to define a condition as borrowed pointer type because raising
> an exception with a message.
> However I don't know how to use it. Is it possible?
Unfortunately not; due to a limitation of type parameters (they do not
carry lifetime bounds) the method we used to implement conditions does
not support passing values to a condition handler by borrowed pointer.
We may work around it at some point; there are a few possibilities that
might work but none of them are terribly appealing.
For the time being you need to pass values to conditions by value or by
owning or managed pointers.
More information about the Rust-dev