Files
archy/core/target/debug/deps/libmatchers-424da85158e6cc78.rmeta
T

81 lines
22 KiB
Plaintext
Raw Normal View History

2026-01-24 22:59:20 +00:00
rust
U#rustc 1.93.0 (254b59607 2026-01-19)Áõ…·fÊ ¦%g--c48c539199cbc88bÁ³VOÐêùÿ²?ÑL¼§Ì±-a7a40eb546f9e2b0Áá\ƒ¦è3$|]åŒ[IÚ tæ-14b12edc9f8cd90bÁë&Gf·Ã ¬ëñq:¤»b-bb76018b1173caf6Áà 9m Ù„«ÐÒþá•cB;-030c5b0bba47cc8fÁrustc_std_workspace_coreÁÛ¹þÓ7>H%¸ÚÉ­-4b81d37a5530864dÁüÃùs<Uß7VyóHr#QÏ-c66cc7807550ce25Á miniz_oxideÁõFÖˆÚ™ª‹"ÞXzLVª-62cbc7af83058505Áadler2Á—wÉD‘嵯|6¨%Œ
+-2f171dd2394b4b62Á hashbrownÁ,ïcV¼¨ø¢:Ê\'È߈-9571ba9e0f6c7a90Árustc_std_workspace_allocÁ%¥Èxµù·¼5Ä3Bœ-aac566ad65903fa4Á
std_detectÁMmáýZ^9õ Îà§e˜÷e-2edb296e590136d8Árustc_demangleÁ@¼§VÉNb˜æ¨fHÌ+V3-53b132e4a2fa6e26Ácfg_ifÁfÝv.Å"ÒÜuPp¹ˆ¶-f76b385d7d4d7f3eÁ addr2lineÁÕú-WiúQVÓ¬
µT§5-fe25100bd73e48e4ÁgimliÁ¹xLáÇí÷‘o±Ñ8£Å-265ba9e6e4f70b3fÁobjectÁÔ³ÝzÓÿ¶ò°öM›¼òü`-9ae0d1f8ea52a318ÁmemchrÁRÎ÷׎™te~QÓ¿ØC\Ò-0bff3c8e8f4e489eÁ  –©HtGNÏ·ˆ!á-d69228d077d46f36Áregex_automataÁ9qå²§å>3fµŒ?¥@å-d5848755b950106dÁ regex_syntaxÁ"iˆ&-î„_üÊ-dbaf20854ff22555Áà$ÔWà$ÉW     new_anchoredÁ÷matcherÁmatchesÁimpl AsRef<str>Á
debug_matchesÁimpl fmt::DebugÁdisplay_matchesÁimpl fmt::DisplayÁ read_matchesÁ
impl io::ReadÁ® advanceÁ
is_matchedÁÄ !Ò è #ü #
&¨
&À
)impl io::Read + SizedÁ+® +Õ.® .writeÁ.flushÁPatternÁ2® 2 automatonÁ2anchoredÁ6® 6Í9® 9ÈMatcherÁ<® <° <@® @Í C® CÈ












!
#
&
-
-
0
0
1
8
8
8
;
B
B
B
E
à`22 4° 5À $ÍE4wÃÍõ® Þ¯à`<<ó >° ?%‡ðƒ†¤¼ùâÞùÔv22 4° 5À $ÍE4wÃÍõööDFAÁøùstÁúmsÁûspecialÁüaccelsÁýpreÁþquitsetÁÿÂMØoØ•Œ§‡ßAßA­âAbufÁ«<ãA¾ «<µ[<™é•E•EEGlobalÁ Ï€ûkW¬ s‹`ùßù62@<92C<2+<.<à`#Þ
Ôv
`ß2<Íë
ï+ioÁð
çFromStrÁ<ù
Ôv
BuildErrorÁT¨ »ýÔ ö AutomatonÁLò ø StateIDÁ<£ ÿ!
AnchoredÁDÀ ¸% ü–‘ü1. Regex matchers on character and byte streams.Á2Ë|6 ## OverviewÁFËüJRO The [`regex`] crate implements regular expression matching on strings and byteÁüTQ arrays. However, in order to match the output of implementations of `fmt::Debug`ÁüòRO and `fmt::Display`, or by any code which writes to an instance of `fmt::Write`ÁüÅMJ or `io::Write`, it is necessary to first allocate a buffer, write to thatÁü“63 buffer, and then match the buffer against a regex.ÁÊËüÎVS In cases where it is not necessary to extract substrings, but only to test whetherÁü¥OL or not output matches a regex, it is not strictly necessary to allocate andÁüõSP write this output to a buffer. This crate provides a simple interface on top ofÁüÉOL the lower-level [`regex-automata`] library that implements `fmt::Write` andÁü™NK `io::Write` for regex patterns. This may be used to test whether streamingÁüè;8 output matches a pattern without buffering that output.Á¤Ëü¨OL Users who need to extract substrings based on a pattern or who already haveÁüøB? buffered data should probably use the [`regex`] crate instead.Á»Ël¿
## SyntaxÁÍËüÑRO This crate uses the same [regex syntax][syntax] of the `regex-automata` crate.Á¤ Ëü¨ -* [`regex`]: https://crates.io/crates/regexÁüÖ ?< [`regex-automata`]: https://crates.io/crates/regex-automataÁü–
IF [syntax]: https://docs.rs/regex-automata/0.4.3/regex_automata/#syntaxÁ2<Íï+ìçüÔvñ»ýðöÉæø åÞÿ!
ÿÕ¸% ¢¥¨äå
Ÿ¢
üŒ &kü¸ bôÝ Mü );İ 'À
üî5üØIF Returns a new `Pattern` for the given regex, or an error if the regexÁ„¦
was invalid.Á»ËüÃKH The returned `Pattern` will match occurances of the pattern which startÁü“MJ at *any* in a byte or character stream — the pattern may be preceded byÁüåIF any number of non-matching characters. Essentially, it will behave asÁü³GD though the regular expression started with a `.*?`, which enables aÁüÿFC match to appear anywhere. If this is not the desired behavior, useÁüÊ&# [`Pattern::new_anchored`] instead.ÁõË„ý
For example:Á< ```ÁÔž use matchers::Pattern;Á½ËüÅA> // This pattern matches any number of `a`s followed by a `b`.Áü‹EB let pattern = Pattern::new("a+b").expect("regex is not invalid");ÁÕËüÝKH // Of course, the pattern matches an input where the entire sequence ofÁü­&# // characters matches the pattern:ÁüØ0- assert!(pattern.display_matches(&"aaaaab"));ÁËü•C@ // And, since the pattern is unanchored, it will also match theÁüÝ>; // sequence when it's followed by non-matching characters:Áü =: assert!(pattern.display_matches(&"hello world! aaaaab"));Á¸'õF Fê³í³î³Òï³ìð³ñ³ò³ìäs{©¶À»»¼¯ ôf¾ÖA¢ØŠ  
patternÁ<ùü­%>ü¸JG Returns a new `Pattern` anchored at the beginning of the input stream,Áü‡)& or an error if the regex was invalid.ÁµËü½KH The returned `Pattern` will *only* match an occurence of the pattern inÁüIF an input sequence if the first character or byte in the input matchesÁüÛJG the pattern. If this is not the desired behavior, use [`Pattern::new`]Á instead.Á»Ë„à'¸'ÔäÇ'ƒËü‹Aõ'üÑ.+ let pattern = Pattern::new_anchored("a+b")Áü„ (% .expect("regex is not invalid");Á± Ëü¹ @= // The pattern matches an input where the entire sequence ofÁüþ &ì)ü©!0*Þ!Ëüæ!GD // Since the pattern is anchored, it will *not* match an input thatÁü²"+( // begins with non-matching characters:Áüâ">; assert!(!pattern.display_matches(&"hello world! aaaaab"));Á¥#Ëü­#HE // ...however, if we create a pattern beginning with `.*?`, it will:Áüú#2/ let pattern2 = Pattern::new_anchored(".*?a+b")Áü±$(¨2üÞ$>; assert!(pattern2.display_matches(&"hello world! aaaaab"));Á<¡%¸'d´%G Gà-  Ê%
õ-<Á%Äÿ&ÀÕvÖvDž'£'±.ü¹'/D¼'H Hê³í³î³Òï³ìð³ñ³ò³ìäs{©¶ÀÀÕv È'
ö Å'ì‰(® ©ââ Ž(øâL‘(¯ "ü¢*'ü­()& Obtains a `matcher` for this pattern.ÁÛ(Ëüã(KH This conversion is useful when wanting to incrementally feed input (viaÁü³)YV `io::Write`/`fmt::Write` to a matcher). Otherwise, the convenience methods on PatternÁd* suffice.Á<©*I <<ó >° ?%‡ðƒ†¤¼ù  ±*
â$²*ü„-2üµ,<9 Returns `true` if this pattern matches the given string.Á<-JK  KÒ Ò  “-©â’?|ž-ñ’?T£-
â’?$”-ö š-.0üå38üæ-LI Returns `true` if this pattern matches the formatted output of the givenÁü·.# type implementing `fmt::Debug`.Áß.Ë„ç. '\ü. ```rustÁÔŒ/Ç'«/ˤ³/ #[derive(Debug)]Á´Ì/ pub struct Hello {ÁÌç/ to: &'static str,Á,…00Ëü—0GD let pattern = Pattern::new(r#"Hello \{ to: "W[^"]*" \}"#).unwrap();Á
¨
 ò<©âÅNŒý<å`ÅNd=
âÅN$ó<Þ ù<,.ü¯?AüÏ=NK Returns either a `bool` indicating whether or not this pattern matches theÁü¢>JG data read from the provided `io::Read` stream, or an `io::Error` if anÁüñ>+( error occurred reading from the stream.Ád¶?P Ó
ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶  ¡Ñ
íÓ¶neò¢ËfÓ
 Ã?©â¾QlÎ? ¾QDÓ?
â¾Q$Ä?ìÊ?,.ü½@*® Æ: Â@Ö:LÝ@ù !#&)üü@ <ÿ@Q  ‡A
â$ŒAinputÁ,Aü­D üÀCHE Returns `true` if this `Matcher` has matched any input that has beenÁlD
provided.ÁT´DR  ¿D
â$ÀDüÈF5üÏEL?ü F#ä?<ÏFSù S?Ò "" äFº?|åFÊ?TêF
!â?$ÛFö áF$&üÛI;üâHL?ü³I#ä?lâITù TÒFü $$ ýIúF|þIŠGTƒJ
#âÒF$ôIÞ úI$&|¥J,¯Jü©L?ü®KL?üÿK%ÙF|°LUù UÅN¨
'' ÍLíNŒÎLýNdÓL
&âÅN$ÄLÞ ÊL$&|÷L,MüÐOLüþMNÀNüÑNJ—Oü O+êOd×OùÊ ÃQÊ **©â±Z,P ±ZD÷O
)â±Z$èOìîO¬òOüöQ,® ,,Æ: ûQÖ:LþQù-Œ`-ü©R/L¬RVW  Wê³í³î³Òï³ìð³ñ³ò³ìäs{©¶›TѼѼÒ¼ štÀ.+ ¶R+
-â$»Rö ÁRü T+® //Æ: ¥TÖ:L¨Tù01àä10 "üÒT=,ÕTXY  Y
™Tê³í³î³Òï³ìð³ñ³ò³ìäs{©¶“R. ÛT.
0â$àTbytesÁ,æTüüV,,ÿVZ ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶›T“R. …W.
1â$ŠWü„%üË GD A compiled match pattern that can match multipe inputs, or return aÁü“