|
|
|
|
|
by dbaupp
4381 days ago
|
|
The doubled ' is just a bug in the documentation generator (fixed by https://github.com/mozilla/rust/pull/14900, which is unfortunately (and strangely) failing tests at the moment). Its true form is pub struct Request<'a> {
pub origin: &'a Request,
pub params: HashMap<String, String>
}
where the 'a is representing the lifetime of the origin reference (that is, it is asserting that a Request struct is only usable for as long as the reference in the `origin` field is valid). Lifetimes/references are one of the core features of Rust guaranteeing both memory safety and performance.See also: http://doc.rust-lang.org/master/guide-lifetimes.html |
|