Hello,
Newbie question . What does it mean by
trait Foo : 'static {
}
I've seen it in gtk-rs.
Thanks
Hello,
Newbie question . What does it mean by
trait Foo : 'static {
}
I've seen it in gtk-rs.
Thanks
This means that any implementation of Foo
can only hold static references.
Or no references at all, to be clear. Generally T: 'static
means T
is not tied to any lifetime region so you can freely send it to anywhere.
Thanks now I understand.
Where do you find this information?
Once you have gone through the more introductory documentation. You get to the reference. trait bounds might be closing in on this. Going deeper in gaining knowledge are release notes, RFCs and more weekly. For the most obscure/extreme there is this forum pointing the way.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.