doc.rust-lang.org/std/borrow/trait.Borrow.html
Preview meta tags from the doc.rust-lang.org website.
Linked Hostnames
1General Meta Tags
6- titleBorrow in std::borrow - Rust
- charsetutf-8
- viewportwidth=device-width, initial-scale=1.0
- generatorrustdoc
- descriptionA trait for borrowing data.
Link Tags
4- alternate icon../../static.files/favicon-32x32-6580c154.png
- icon../../static.files/favicon-044be391.svg
- stylesheet../../static.files/normalize-9960930a.css
- stylesheet../../static.files/rustdoc-916cea96.css
Links
4- https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++pub+struct+CaseInsensitiveString(String);%0A++++%0A++++impl+PartialEq+for+CaseInsensitiveString+%7B%0A++++++++fn+eq(%26self,+other:+%26Self)+-%3E+bool+%7B%0A++++++++++++self.0.eq_ignore_ascii_case(%26other.0)%0A++++++++%7D%0A++++%7D%0A++++%0A++++impl+Eq+for+CaseInsensitiveString+%7B+%7D%0A%7D&edition=2024
- https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::borrow::Borrow;%0A++++%0A++++fn+check%3CT:+Borrow%3Cstr%3E%3E(s:+T)+%7B%0A++++++++assert_eq!(%22Hello%22,+s.borrow());%0A++++%7D%0A++++%0A++++let+s+=+%22Hello%22.to_string();%0A++++%0A++++check(s);%0A++++%0A++++let+s+=+%22Hello%22;%0A++++%0A++++check(s);%0A%7D&edition=2024
- https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::borrow::Borrow;%0A++++use+std::hash::Hash;%0A++++%0A++++pub+struct+HashMap%3CK,+V%3E+%7B%0A++++marker:+::std::marker::PhantomData%3C(K,+V)%3E,%0A++++++++//+fields+omitted%0A++++%7D%0A++++%0A++++impl%3CK,+V%3E+HashMap%3CK,+V%3E+%7B%0A++++++++pub+fn+insert(%26self,+key:+K,+value:+V)+-%3E+Option%3CV%3E%0A++++++++where+K:+Hash+%2B+Eq%0A++++++++%7B%0A++++unimplemented!()%0A++++++++++++//+...%0A++++++++%7D%0A++++%0A++++++++pub+fn+get%3CQ%3E(%26self,+k:+%26Q)+-%3E+Option%3C%26V%3E%0A++++++++where%0A++++++++++++K:+Borrow%3CQ%3E,%0A++++++++++++Q:+Hash+%2B+Eq+%2B+?Sized%0A++++++++%7B%0A++++unimplemented!()%0A++++++++++++//+...%0A++++++++%7D%0A++++%7D%0A%7D&edition=2024
- https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::hash::%7BHash,+Hasher%7D;%0A++++pub+struct+CaseInsensitiveString(String);%0A++++impl+Hash+for+CaseInsensitiveString+%7B%0A++++++++fn+hash%3CH:+Hasher%3E(%26self,+state:+%26mut+H)+%7B%0A++++++++++++for+c+in+self.0.as_bytes()+%7B%0A++++++++++++++++c.to_ascii_lowercase().hash(state)%0A++++++++++++%7D%0A++++++++%7D%0A++++%7D%0A%7D&edition=2024