Files
meetingroom-netscreen/push_screen_rust/target/x86_64-pc-windows-gnu/debug/deps/libequivalent-62f70edf4089a8a5.rmeta

21 lines
7.2 KiB
Plaintext
Raw Normal View History

rust
_Brustc 1.91.1 (ed61e7d7e 2025-11-07) (Rev1, Built by MSYS2 project)<29><02>0<>#`a<><61>i<EFBFBD>+<2B>F<EFBFBD>T8<-0a5677bcdbf6ca93<39><02>1<>-<2D>3<EFBFBD><33>%<25>:<3A><>R<>-0a51333fad0e7ace<63><01><02>
Equivalent<EFBFBD>K<>
equivalent<EFBFBD>Q<><01><01>
Comparable<EFBFBD> <01> compare<72><01><01><01>88 8 88888 <01><01> <01><01>  <02>g4<67><01><02>D<><01><><04><00><00>LI [`Equivalent`] and [`Comparable`] are traits for key comparison in maps.<2E>M<02><00>QMJ These may be used in the implementation of maps where the lookup type `Q`<60><00><>2/ may be different than the stored key type `K`.<2E><1C><02><00><>LI * `Q: Equivalent<K>` checks for equality, similar to the `HashMap<K, V>`<60><00><>'$ constraint `K: Borrow<Q>, Q: Eq`.<2E><00><>MJ * `Q: Comparable<K>` checks the ordering, similar to the `BTreeMap<K, V>`<60><00><>(% constraint `K: Borrow<Q>, Q: Ord`.<2E><1C><02><00><>OL These traits are not used by the maps in the standard library, but they may<61><00><>JG add more flexibility in third-party map implementations, especially in<69><00><>KH situations where a strict `K: Borrow<Q>` relationship is not available.<2E><1C><02>t<> # Examples<65><1C><02><<3C> ```<60><00><> use equivalent::*;<3B><00><> use std::cmp::Ordering;<3B><1C><02><00><>(% pub struct Pair<A, B>(pub A, pub B);<3B><1C><02><00><>RO impl<'a, A: ?Sized, B: ?Sized, C, D> Equivalent<(C, D)> for Pair<&'a A, &'a B><3E>L<> where<72>̍ A: Equivalent<C>,<2C>̧ B: Equivalent<D>,<2C>,<2C> {<7B><00><>41 fn equivalent(&self, key: &(C, D)) -> bool {<7B><00><>B? self.0.equivalent(&key.0) && self.1.equivalent(&key.1)<29>L<> }<7D>,<2C> }<7D><1C><02><00><>RO impl<'a, A: ?Sized, B: ?Sized, C, D> Comparable<(C, D)> for Pair<&'a A, &'a B><3E>L<> <01> ̰  A: Comparable<C>,<2C><00><>  B: Comparable<D>,<2C>,<2C> <01> <00><> 52 fn compare(&self, key: &(C, D)) -> Ordering {<7B><00><>
*' match self.0.compare(&key.0) {<7B><00><>
:7 Ordering::Equal => self.1.compare(&key.1),<2C><00><> '$ not_equal => not_equal,<2C>l<>
}<7D>L<> <01> ,<2C> <01><1C> <02>|<7C> fn main() {<7B><00><> =: let key = (String::from("foo"), String::from("bar"));<3B><00><> $! let q1 = Pair("foo", "bar");<3B><00><> $! let q2 = Pair("boo", "bar");<3B><00><> $! let q3 = Pair("foo", "baz");<3B><1C> <02><00><> %" assert!(q1.equivalent(&key));<3B><00><> &# assert!(!q2.equivalent(&key));<3B><00><> &# assert!(!q3.equivalent(&key));<3B><1C><02><00><>63 assert_eq!(q1.compare(&key), Ordering::Equal);<3B><00><>52 assert_eq!(q2.compare(&key), Ordering::Less);<3B><00><>85 assert_eq!(q3.compare(&key), Ordering::Greater);<3B>,<2C><01><<3C><01>
 <02><13>g<13><01><02><13><01><><04><><13><01><><13><01><><00><> Key equivalence trait.<2E><1C><02><00><>LI This trait allows hash table lookup to be customized. It has one blanket<65><00><>NK implementation that uses the regular solution with `Borrow` and `Eq`, just<73><00><>NK like `HashMap` does, so that you can pass `&str` to lookup into a map with<74><00><> `String` keys and so on.<2E><1C><02>t<> # Contract<63><1C><02><00><>>; The implementor **must** hash like `K`, if it is hashable.<2E>T<><01><01><><00><><12><01><><01> <0C><00><>&<00><>>; Compare self to `key` and return `true` if they are equal.<2E>T<EFBFBD> <13> <14> <0C> <01><01>$<24>key<65><1C><00><>Q<01> <01>

<01><><01> <0C><00> <0C><01><01><14><01><01><01>L<><00>  79=?<00><>%T<> <15> <16> <0C> <01><01>$<24><01><1C><00><>.<00><> Key ordering trait.<2E><1C><02><00><>MJ This trait allows ordered map lookup to be customized. It has one blanket<65><00><>OL implementation that uses the regular solution with `Borrow` and `Ord`, just<73><00><>OL like `BTreeMap` does, so that you can pass `&str` to lookup into a map with<74><00><><01>T<> <01>   <00><1C><><17><01><01>l<><00> <0C> <00>"<00>""$&<00><>'<00><>41 Compare self to `key` and return their ordering.<2E><<3C> <17> <18><01><><01><><01><>Less<73><01><><01><><01><><02><01><><01><><01><>Greater<65><01><><00>#8<>Ҝ<EFBFBD><D29C>  <0C> <01><01>$<24><01><1C><00><>R<01><01><00> <0C><00> <0C><01><01><1C><00>L<><00>,.24<00><>&<<3C> <19> <1A><00>$ <0C> <01><01>$<24><01><1C><17><13> <0C><13><17><13> <0C><13><13> <0C><13>H<13> <0C><13><01> <01><01><01><01><01>R <0B><><EFBFBD>E<00>Dyp
<EFBFBD>&xHZ?<3F>"C/c<1F><><EFBFBD><EFBFBD><EFBFBD>ixd<78><64>S<03><><EFBFBD><EFBFBD>|<7C>Y<EFBFBD><59>,<2C>n<EFBFBD>
]kp4]<5D>V<EFBFBD><56><EFBFBD><1A>ۥl <0A>H}W<>6<<3C><><EFBFBD>#<23><>~<7E><><EFBFBD><1C><>8e<38>) <0C>B<EFBFBD>(A<>ҁ<EFBFBD><D281><EFBFBD>F<EFBFBD><46><1B><><EFBFBD>P<EFBFBD><50>WOˇV<68><DE96>t<EFBFBD><74><EFBFBD><EFBFBD><EFBFBD>F<EFBFBD>~l<> <0B>^<5E><><EFBFBD><EFBFBD>5}<7D>Wq<57><71><EFBFBD> <20>rlm<0F>o佤n؁~<7E>W<>;<> <0C> E <20>18E3<45>`<60><><EFBFBD><EFBFBD><0F>)<10>M<EFBFBD>w<EFBFBD>V:m<><6D><74> 7<00><00>B <0B><<00>
<00> {g!<00>@ <00> <00> <00>k    ? ] %<0F>m<00><12>w { } <0B> <0B> <0B> <0A> v<0E><0E><0E>b t<12><12><12><12>!y <00> <0B> Y <0A> <00><0E><0F> Zv<12><12><12><12> %} <0A> V<0E><0E><0E>E<0F><11>C~<12><12>^ <0A> J}<0E><0E>9<0F><11>#x<12><12>Z<0E>Ii<00>&n<00>(p<00>^<00>r<00><00> <00><0E><00><12>dS <00><00> <00>= W {<00>!<12><00><00><00><00><00><00><00><00><00><00><00>'+29@FLRX^dj<00> <00>l(<00> <00>p<13><13><13><13><02> R <0B><><EFBFBD>E<00><><EFBFBD>m<>i<>m"F6]<18>ODHT  <02><>~l<> <0B>^<5E><><00>B<EFBFBD>(A<>ҁ 18E3<45>`<60><>/c<1F><><EFBFBD><EFBFBD><EFBFBD>HZ?<3F>"C<00>,<2C>n<EFBFBD>
]kp4]<5D>V<EFBFBD><56><00><1A>ۥl <0A><1C><>8e<38>) <00><>P<EFBFBD><50>WO<57>Dyp
<EFBFBD>&x<00><>5}<7D>Wq<57>R <0B><><EFBFBD>E<00><00>o佤n<13><00>~<7E>W<>;t<><74><EFBFBD><EFBFBD><EFBFBD>F<EFBFBD><> <0C> E <20><00><><0F>)<10>M<00><> <20>rlm<00>w<EFBFBD>V:m<><00><74> 7H}W<>6<<3C><> ixd<78><64>S<00><><EFBFBD><EFBFBD>|<7C>Y<EFBFBD><00><><EFBFBD>F<EFBFBD><46><1B> <00>#<23><>~<7E><><EFBFBD>
<00>V<68><DE96>a@Eu!5x\e<{MlL[&s<0E>Q<EFBFBD><51><EFBFBD><EFBFBD>whGka@Eu!5x\e<{MlL^C:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\equivalent-1.0.2\src\lib.rs<72> s<>+^<5E><12>FS<46><53>>~<7E><00>qMN3M(N)PKL)S
5C
S
6+;(
>%%%&''769 MOO?"C+/ ,*NPP19,/ -%<00><>7M<k<>kH<6B>j<EFBFBD>4<EFBFBD><34><EFBFBD>Qx86_64-pc-windows-gnu<6E><00><>w~<7E><><EFBFBD>V<><56><05><01>-62f70edf4089a8a5<61>R <0B><><EFBFBD>E<00><02>6R<02>$<00>#<00>  '' 9'0&66&&&9&& $9  6&w<01>rust-end-file