Files
boc/aamos-ledger-rust/target/debug/deps/libgarde-7f0dfa958191eacf.rmeta
T

1534 lines
299 KiB
Plaintext
Raw Normal View History

rust
#rustc 1.96.0 (ac68faa20 2026-05-25)ÁÀ뉊]!ÜÛê(¹Þ—šên-5be7b69c3ff7b5b8ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁ¤²XctÔ'ÐÓ©z¨ɽÓ-a4945860e1c53b00Á¤°ð ¾ä-±($²ï=©Ã-7e98a21bfd32b0edÁòÖÀH•‘PIÓHã#£-055f30b747f859b6Árustc_std_workspace_coreÁ­Cçß^ò½èÝ$­Çÿ+Cé-c4878ee60b2242c9ÁŸÃï+Ñ]ŠqB<ÏïW#-8dd1dd90e70d0b6aÁ miniz_oxideÁ€š»J(P>àö÷g\K-1eb618da2918ab7fÁadler2ÁÆ;+Þ®5¥Ìýݰ¦ÛLˆ-f7919172d268e069Á hashbrownÁPäV9ÒÆèÜ"ÊÖVŽ\-0fc2184a5da6723aÁrustc_std_workspace_allocÁs&ØòØy¯s•bæ!‰ýŠ-97e4bf30be240674Á
std_detectÁhŠBîÙºÌI®ËÅš-9dbbf8346ba7ac8bÁrustc_demangleÁûë9´Ç×@Œ’ùXFº-f33013f239bf9f14Ácfg_ifÁÜLhž§Œaã¯>­-0a71c8f33a838301Á addr2lineÁ׎Þ!]8V$É@@-e618e6be60e87ba2ÁgimliÁ¸
°µ~Î1‹Ñt ðÁ€w-1f7768a68858f670ÁobjectÁ
áPÃ?­À¶¼QHJ¥-914cd6a4dbe590d1ÁmemchrÁ›º«8Ór­2Ù $¨ûib-cf21ca6f2bb15dcdÁë
‹ás«LÖ€îâƒ×ɯŒ-ee6f3747e38367f0Á compact_strÁ´—dh˜Nh>a:Ó-9bfac81f080013f7ÁcastawayÁ¼ëîP°½}z#ŽàŸ-cf5029cbfec68998Á rustversionÁTgÌüÁé¨Cå@Ö'G-f0da710c68354185Ástatic_assertionsÁ´m-5q< ¾²ÃëÏÿ-f6f564d31b3b65e5Á®f©¾/ô)c§{õa“â‘-a3906971a93fd1b8ÁitoaÁrLpèòÐ
ݽ‚AéGT'-7ba5a7b63f68a66bÁryuÁ4>ûŸ?·üapƒÈ»å-6eb1932a1aea6cadÁsmallvecÁ[“S‰«2ûÓàÁ3™ËºS-fa382cf08413422fÁserdeÁFVæ¸Û•IÄÀzÍ-9c8ce3cf08540cc3Á serde_deriveÁ,w|êñ]ù¿¥­C£ð-975c43f96d83014eÁ
serde_coreÁ²€Ãb˜cÐòžÇÇ
-7a42419d8e43b208ÁtestsÁ,$á ,ç:$Ü:Y credit_cardÁ\x» credit-cardÁ¼VYemailÁ,§» Œ‹º graphemesÁLä »unicodeÁœÆ º HasGraphemesÁdž
»ç œõ š regex_js_sysÁd»regexÁŒÆš´
,ˆ »´
ŒÝY phone_numberÁd¤» phone-numberÁÄYurlÁ»ˆselectÁ4±»º”…ValidateÁD¹»º ÀerrorÁrc_listÁ ¥ æ   is_emptyÁ appendÁ ùIterÁ'aÁ¥listÁó nodeÁÚ¥æ Ú¥ó   'æ '»'ù*'¬'
into_innerÁ.×1æ 2impl ToCompactStringÁ1ú5×8×PathComponentKindÁ:component_kindÁimpl_path_component_kindÁ=Ú=¥=ƒAemptyÁAA¬Aæ EAjoinÁGA__iterÁITempComponentsÁKÚK  N×O
ComponentsÁPÚPõ
OSÚS×U 
W×rulesÁY alphanumericÁZZZapplyÁ]¥Z AlphanumericÁ_validate_alphanumericÁZa¥a×c Ze¥e×YasciiÁhhh±k¥hAsciiÁmvalidate_asciiÁho¥oÉhr¥rÉYcontainsÁuuu±x¥uContainsÁzvalidate_containsÁu|¥|u¥YinnerÁ±¥¦œInnerÁ¥KeyÁvalidate_innerÁŽ¥ËÖŸ¥ ËÖšœÚœ¥œËœÖ ¢¥¢Ë¢Ö¥YipÁ§§§§±«¥§IpÁ­ErrorÁ­ validate_ipÁ§°×§²¥²Ï²Ü§¥ÏÜYlengthÁºbytesÁ»»±½¥»BytesÁ¿validate_num_bytesÁ»Á¥Áò»Ä¥Äò»HasBytesÁÇ num_bytesÁ» impl_via_lenÁ»ÊŸÊ ÊÆººcharsÁÏϱѥÏCharsÁÓvalidate_num_charsÁÏÕ¥Õ¹ÏØ¥Ø¹ÏHasCharsÁÛ num_charsÁÏimpl_via_charsÁÏ׺ºsimpleÁàà±â¥àSimpleÁävalidate_lengthÁàæ¥æòàé¥éòàHasSimpleLengthÁìµàimpl_via_bytesÁà×àðŸð¥ð ðòàõÚõŸõ¥õ õòººutf16Áüü±þ¥üUtf16CodeUnitsÁvalidate_num_code_unitsÁü¥ùü¥ùüHasUtf16CodeUnitsÁˆnum_code_unitsÁüimpl_strÁººº check_lenÁYmatchesÁŽŽ±¥ ŽMatchesÁ validate_matchesÁŽ¥ Þ!YpatternÁššš±¥žšMatcherÁ is_matchÁšPatternÁ¢validate_patternÁ£žš¥¥¥ñ"§žš©¥©ñ"«žYprefixÁ­­­±°¥­PrefixÁ²validate_prefixÁ­´¥´€$­·¥·€$YrangeÁººº±½¥ºBoundsÁ¿SizeÁ¿MINÁ¿MAXÁ¿validate_boundsÁº OutOfBoundsÁÄLowerÁÅ
ÄUpperÁÇ
º impl_for_intÁºÊ¥Êõ$Ê%ÊŒ%Ê—%YrequiredÁÐÐÐбԥÐRequiredÁÖis_setÁÐØ¥Øä&YsuffixÁÛÛÛ±Þ¥ÛSuffixÁàvalidate_suffixÁÛâ¥â¼'Ûå¥å¼'YAsStrÁèas_strÁYêÚê‰(Yí‰(YïÚï‰(validateÁòòòòòò½økøÊ(ø
validate_withÁø
validate_intoÁòý¥ýò¥å´ò¥æ Ê(Š)ò¥÷òŒ¥Œ×òÚ¥kŸ)òÚ¥kŸ)ò¥kŸ)ò¥kŸ)ò ¡¥¡k¡Ÿ)òimpl_validate_listÁò
¦¥¦Ÿ¦ ¦k¦Ÿ)òimpl_validate_tupleÁò ­k­Ÿ)ò °œ°§°¤°k°Ÿ)ò
œ§kŸ)ò»¥»k»Ÿ)ò¿Ú¿¿k¿Ÿ)Í©ÍÍÍutilÁÑÑÑ__make_nested_pathÁÔÚÔÔimpl FnMut() -> Path + 'aÁÔÔ Ù Ñ
__nested_pathÁÑÑ MaybeJoinÁÝ
maybe_joinÁÞÞ¡ÞCFÁÑâª/ãã¡ãÌ/ListÁç¥çüçµë¥ëƒî¥ð¥ðó¥óÖö¥öï
ù¥ù ü¥ü§þùNodeÁ¥prevÁ»
¥ƒ ¥ ¥
Œ¥ŒÖ¥ï
¥¥§ùReportÁerrorsÁ ƒ ×ÏŸú
¡ƒ£×¦¨Öªï
¬PathÁ®
componentsÁ°ƒ³µÖ·ï
¹»§¼ùKindÁ¾©¿
¾ËÁ
¾IndexÁÃ
Å×ȃ Ì!ÎÖ"Ðï
#Ò$Ô§ÕùNoKeyÁ×
׈%Ú>&܃'ÞÚÞƒ(áÚáƒ)äƒ*æƒ+胧IpKindÁêAnyÁë
êV4Áí
êV6Áï
§§òƒ§»õÆ»÷Ú÷Æ»úÚúÆ»ýÚýƻƻƻ Æ»
ÚÆ» Æ» Æ»
Æ»ÆÏÏÚÏÚÏÚÏœÏžÏ Ï ¢Ú¢Ï
¥Ï §Ï ©Ï
«à­µ®à°Ú°µ²à´Ú´µà¸Ú¸µºà¼µ½à ¿µÀà
µÃà ťŵà ÈÚȥȵà
ÌÚ̵̥àМЧФеàÕ¥Õ¤Õµàٜ٧ٵàݥݵàà¥àµàã¥ãµàæ¥æµàéÚéœé§é¤éµàïÚï¥ï¤ïµàôÚôœô§ôµàùÚù¥ùµàýÚý¥ýµàÚ¥µàÚ¥µüÛ üÚÛ üŽÚŽÛ üÚÛ üÛ üÛ ü˜Û ºšõ$š%šŒ%š—%ºŸõ$Ÿ%ŸŒ%Ÿ—%º¤õ$¤%¤Œ%¤—%º©õ$©%©Œ%©—%º®õ$®%®Œ%®—%º³õ$³%³Œ%³—%º¸õ$¸%¸Œ%¸—%º½õ$½%½Œ%½—%º Âõ$Â%ÂŒ%—%º
Çõ$Ç%ÇŒ%Ç—%º Ìõ$Ì%ÌŒ%Ì—%º Ñõ$Ñ%ÑŒ%Ñ—%º
Öõ$Ö%ÖŒ%Ö—%ºÛõ$Û%ÛŒ%Û—%òValidÁà
à¥àˆòä¥ä×òç¥çƒòê¥ò UnvalidatedÁì
ì¥ìˆòð¥ðƒòó¥òõ¥õ>òø¥ø¤økøŸ)òý¥ýkýŸ)ò¥kŸ)ò¥kŸ)ò¥kŸ)ò¥kŸ)ò¥kŸ)òkŸ)òkŸ)òžžžžkžŸ)ò ¤¤¤¤¤k¤Ÿ)ò!««««««k«Ÿ)ò"³³³³³³³k³Ÿ)ò#¼¼¼¼¼¼¼˜¼k¼Ÿ)ò$ÆÆÆÆÆÆÆ˜ÆÆkÆŸ)ò%ÑÑÑÑÑÑјÑÑšÑkÑŸ)ò&ÝÝÝÝÝÝݘÝÝšÝÝkÝŸ)ò'êêêêêêê˜êêšêêœêkêŸ)ò(øøøøøøø˜øøšøøœøøkøŸ)




)
*
,
/
/
/
4
6
6
6
9
9
9
C
D
G
I
O
O
O
U
U
U
X
X
X
]
`
c
g
k
n
q
t
x
x
{
{
~
~





Ž
Ž
Ž



š
š
š
 
 
 
¥
¥
¥
«
¯
±
±
±
µ
¹
½
À
Ã
Æ
È
Í
Ñ
Ô
×
Ú
Ü
â
å
è
ë
í
ô
ú
þ













¡
¡
£
£
§
§
«
«
°
°
³
³


¹
¹
½
Ã
Ï
Ô
×
Ú
Þ
Þ
á
á
ä
ä
ç
ç
é
ì
î
ñ
ú
û
û
ü
ü
ü
ü
ƒ
ˆ
Ž
Ž
Ž




˜
˜
˜
˜
œ
œ
œ
œ
 
 
 
 
¤
¤
¤
¤
«
«
«
«
¯
¯
¯
¯
µ
µ
µ
µ
º
º
º
º
¾
¾
¾
¾
Ã
Ã
Ã
Ã
Þ
ã
í
ò
ò
õ
ø
ø
û
û
þ
þ



Ž






œ
ž
ž
ž
¢
¤
¤
¤
§
§
©
«
«
­
­
±
´
´

¸
¸
º
º
¼
¼
Æ
Æ
Æ
É
Í
Í
Ï
Ñ
Ñ
Ó
Ó
Õ
Õ
ó
ö
ù
ü
ÿ

ƒ

ˆ
Š
Œ
Ž



˜


Ÿ
¡
¤
¦
¨
ª
¬
®
²

º
½
À
Ã
Ç
Ë
Ï
Ô
Ø
Ü
ß
â
å
è
î
ó
ø
ü


ˆ
Š






ž
£
¨
­
²
·
¼
Á
Æ
Ë
Ð
Õ
Ú
ß
æ
æ
æ
é
ò
ü
ü
ü
ü








ˆ
ˆ
ˆ
ˆ
Œ
Œ
Œ
Œ








˜
˜
˜
˜




£
£
£
£
ª
ª
ª
ª
²
²
²
²
»
»
»
»
Å
Å
Å
Å
Ð
Ð
Ð
Ð
Ü
Ü
Ü
Ü
é
é
é
é
÷
÷
÷
÷




ØÚ+8J8:_mz‹­¿ÇÓÛä술¢²¿ÖàèøÝØççú/éüêµ\Õ3¸`V7¥Ðì_µß___íß__º_še_Ø©1½1ƒ»Qvíj¨Õ_Ðì§`µß§`§`§`íß§`§`º§`še§`ùMÏêó üD»¦®ÔoÄïÚ¥ØÜ2šê2Ÿ
I¨qsák¿cÿaÄcÿa¾ÿaØŸŸÏ úe€’:ü‰=Í¿cÑbÐìÑbµßÑbÑbÑbíßÑbÑbºÑbÄcÑb¾ÑbØ®®ê3¯ö3ØV„érÏáìÐìÞcµßÞcÞcÞcíßÞcÞcºÞcšeÞc¿c¾¿À©ÁÂËÃÄ5r¯‘%tÃ6?Û×dØ×dŠ ×dÐì×dµß×d×d×díß×d×dº×dše×d³×רú5Ùˆ ~sH:KŸXÄc‡f:: Ú:»¾¿BorrowedÁÀˆÁÂOwnedÁÈ¢ÓÛ?'°UFÚ:úHúHßûHÁ‘4Ý­f‰úM÷:© © ª
CompactStringÁ« ˆ Ëω“~û*Ú:‡f: Úòa¿cÞc¿cPPÊRõ
™v§”ýÖ(ÚÄcÞc_Õ__Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÕ_mÕ_m¨izÕ_z¨iªBªBö­BbufÁ÷<®B÷<9)
-ÜnLÕ_çEçEèEGlobalÁ ¿±‡§í#Õ_òaŸòa Ú
òaòa¨iÕ_Ûêëì…7íî•7ïð¤7;¦‡åLé¤~ØÆkŠ ÆkÄcÆk­Õ_­¨i¿Õ_¿¨iÇÃgÇ ÚÃgÇÑfÇàfÇòHòHÆõHµ Ñ,öHphantomÁÑ,÷H¤Ñ,+átLaû§ÛjdžJ†JK‰Jµ 7ŠJ§l7J¤7·0ØQdèÛjÇžBoxÁ¡ˆˆ¢ˆl }.xÏÛjÇ Ú
ÇòHòHÆõHµ Ñ,öH§lÑ,÷H¤Ñ,+átLaû§…oÛjdžJ†JK‰Jµ 7ŠJ§l7J¤7·0ØQdè…oÛjÇžÀm¡ˆˆ¢ˆl }.xÏ…oÛjǪBªBö­B®i÷<®B÷<9)
-ÜnL†oÛjdžoŸÓÕ_Ó¨iÛÃgÛãlÛÑfÛàfÛˆmÛámÛ²nÛ Ú
Û†J†JK‰Jµ 7ŠJ§l7J¤7·0ØQdè¸rÛjÛòHòHÆõHµ Ñ,öH§lÑ,÷H¤Ñ,+átLaû§¸rÛjÛžÀm¡ˆˆ¢ˆl }.xϸrÛjÛªBªBö­B®i÷<®B÷<9)
-ÜnLÛjäÕ_ä¨iìÃgìãlìÑfìàfìˆmìámì²nì›jì ÚªBªBö­B®i÷<®B÷<9)
-ÜnLòaÛjì¤kä‘kä Ú¥ŸìððõbaseÁÜ¿¦p<JÔÏÏœ§¤Ûjì¡
¡
¥
ìuŒ
šI¼²'‡ÕïÕ_¤Ûjìð
ð
Wô
rootÁÀ õ
µÀ ö
¤Ý ÷
_markerÁÀ ê©jÒÈj~‹w‘wÛjìèèBTreeSetÁëØþª¢‡¬söΖÕ_ÛjìŸ(Ÿ(VecDequeÁ¢(headÁ$£($¤(®i‚$C¯\j Õ­çÕ_Ûjìš š
BinaryHeapÁ dataÁ¾zìÐÉÖÕ_Ûjì÷ ÷
LinkedListÁú ²xç û tailÁç ü ç ý ¤ç þ Úç ”½>úK_ÙÕ_Ûjì ÚððõìuÜ¿¦p<JÔÏÏœ§¤Ûjì Ú¡
¡
¥
ìuŒ
šI¼²'‡Õïòa—wÛjì Úð
ð
Wô
úvÀ õ
µÀ ö
¤Ý ÷
¢wÀ ê©jÒÈj~ì{ò{Ûjì ÚèèÞwëØþª¢‡¬söΖòaÛjì ÚŸ(Ÿ(¡x¢(²x‚$£(‚$¤(®i‚$C¯\j Õ­çòaÛjì Úš š €y “y¾zìÐÉÖòaÛjì Ú÷ ÷ Éyú ²xç û èyç ü ç ý ¤ç þ Úç ”½>úK_ÙòaÛjÕ_¨iˆÃgˆãlˆÑfˆàfˆˆmˆámˆ²nÕ_ ¢Õ_¢¨i²Õ_²¨i¿†o¿¿¿¿Èf¿¿¿¿¿¿¿¿¿¿¨iÖ¨iàÕ_à¨ièÑfèÃgèàf¿cààá¾Dãˆò 8
ÀF ~4@Õ_Øê‚Š ê‚é!ê‚Øììí—Eïˆò a]°.Ó)£|Õ_Š ǃ³ǃéǃÕ_¿cǃøÄhø ÚòaøžÀm¡ˆˆ¢ˆl }.xÏÕ_ÛjøòHòHÆõHµ Ñ,öH§lÑ,÷H¤Ñ,+átLaû§Õ_Ûjø†J†JK‰Jµ 7ŠJ§l7J¤7·0ØQdèÕ_Ûjø§wøÔxøöyø¿zø—yø›jø
Õ_øÕ_Ÿøø–‡ø–‡¨‡ø–‡¨‡½‡ø–‡¨‡½‡Õ‡ø–‡¨‡½‡Õ‡ð‡ø–‡¨‡½‡Õ‡ð‡Žˆ˜ø–‡¨‡½‡Õ‡ð‡Žˆ¯ˆø –‡¨‡½‡Õ‡ð‡Žˆ¯ˆÓˆšø
–‡¨‡½‡Õ‡ð‡Žˆ¯ˆÓˆúˆ ø –‡¨‡½‡Õ‡ð‡Žˆ¯ˆÓˆúˆ¤‰
œø –‡¨‡½‡Õ‡ð‡Žˆ¯ˆÓˆúˆ¤‰щ øøÙvøèwø¨iø»¾¿îeÀˆÁÂfÈ¢ÓÛ?'°UFÚ¨‡ÝÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÞcë硟°®È¾òêçàðìî祟²®Ë¾ð禟³®Ì¾ó猨Ÿµ®Î¾ö窟·®Ð¾ù笟¹®Ò¾üç»®Ô¾£ŸÅ¾N®SàŒì.5Ÿ8×W®°ê07ŸÇ¾ñêʾôêêàóìÚ×õìÜÞ
á»äúHæ© è×=
aeÛ¼orÛ¼|Û¼ªB•œ
¢Û¼²Û¼ÁÄÛ¼õúH÷
ú
ý»òH‚†J„
òH‹†JªBÊÕØÛ¼úH“

»œòHž†J ¢
¥†J§òH©«ªBæéÛ¼ðõ
­úH°
´
¸»¼òH¿†JÂŪBÈ
Ì
ÐðÕ¡
Ùð
ÝèàŸ(ãš æ÷ é
ï
ô
ù
ý


Û¼úH‹
Ž
»òH–†J˜¥©Û¼´·Û¼šŸ¤©®³¸½ÂÇÌÑÖÛÊÛ¼ØÛ¼âåÛ¼ê
íúHï»àì

òH¡†Jø¡
ýèš …÷ ‰Ÿ(ªB‘ ¦

ž
¤
«
³
¼
Æ
Ñ
Ý
ê
ø
­
°ðð
»Û¼¿»âÛ¼Ø î Ðì?µß##íß#º#še#ùM¿cÄc.¾Û Š ³:_*m z  ­¿ Ç
ÓRÛ äNìˆ -¢² ¿ ÖNàè é!éøÝ¯Èf†ou8::MINÁ8‰  ÏΆoø‰þ
†oP‰ )HÏΆou8::MAXÁu16::MINÁøÏ{¢vºøÏu16::MAXÁu32::MINÁôü Ñð§þë0 Ñu32::MAXÁu64::MINÁoxÈÒm¬|j°ÈÒu64::MAXÁÈf
usize::MINÁñú—ÕÈfï±þÈfì2—ÕÈf
usize::MAXÁ u128::MINÁ|ðÓzw½ðÓ u128::MAXÁ8‰å
 ‚Çø‰Í
ºP‰Ø
)H‚Çi8::MINÁLUƒÇJ»YGmƒÇi8::MAXÁÎÖ¤ÈÊ¿ØÅê ¤Èi16::MINÁ¥È
À
0P¥Èi16::MAXÁÆÉÄŸ³ÓÆÉi32::MINÁÙâÇÉ×ÅæÔúÇÉi32::MAXÁ\eèÊZÉiW}èÊi64::MINÁ£¬éʡʰžÄäéÊi64::MAXÁ&/¬Í$Î3!Gg¬Í
isize::MINÁox­ÍmÏ|j°­Í
isize::MAXÁôýŠÌòÓï5ŠÌ i128::MINÁ<E‹Ì:ÔI7]}‹Ì i128::MAXÁÿÿÿf32::MINÁÿÿf32::MAXÁÿÿÿÿÿÿïÿf64::MINÁÿÿÿÿÿÿïf64::MAXÁ
ÁÕ_Õ_ÀüÏÍÒ§&MÁÕ_Ò§T::MINÁ4
ÂÕ_Ò§üóÎÒ§&GÂÕ_Ò§T::MAXÁ„ß ×Ø%‡f07>œÙ àÕ_á(ê‚4Õ_;BÌ— ìÕ_í(ǃ4Õ_;BÌÍÑÀÏ,iŸÅê3$p®ÆÜ24vÇ—E\×ìɾD,äàʽøËÿ.lÒÛüû
øúªü&úª# Garde &emsp; [![Documentation]][docs.rs] [![Latest Version]][crates.io]
[docs.rs]: https://docs.rs/garde/latest/garde/
[crates.io]: https://crates.io/crates/garde
[Documentation]: https://img.shields.io/docsrs/garde
[Latest Version]: https://img.shields.io/crates/v/garde.svg
A Rust validation library
- [Basic usage example](#basic-usage-example)
- [Validation rules](#available-validation-rules)
- [Length modes](#length-modes)
- [Inner type validation](#inner-type-validation)
- [Newtypes](#newtypes)
- [Handling Option](#handling-option)
- [Custom validation](#custom-validation)
- [Context/Self access](#contextself-access)
- [Implementing rules](#implementing-rules)
- [Implementing `Validate`](#implementing-validate)
- [Rule adapters](#rule-adapters)
- [Integration with web frameworks](#integration-with-web-frameworks)
- [Feature flags](#feature-flags)
- [Why `garde`?](#why-garde)
### Basic usage example
To get started, install `garde`:
```text,ignore
cargo add garde -F full
```
And attach the `Validate` derive to your type. `garde` will generate an implementation of the `Validate` trait for you,
allowing you to call the `validate` method.
Here's what that looks like in full:
```rust
use garde::{Validate, Valid};
#[derive(Validate)]
struct User<'a> {
#[garde(ascii, length(min=3, max=25))]
username: &'a str,
#[garde(length(min=15))]
password: &'a str,
}
let user = User {
username: "test",
password: "not_a_very_good_password",
};
if let Err(e) = user.validate() {
println!("invalid user: {e}");
}
```
Garde can also validate enums:
```rust
use garde::{Validate, Valid};
#[derive(Validate)]
enum Data {
Struct {
#[garde(range(min=-10, max=10))]
field: i32,
},
Tuple(
#[garde(ascii)]
String
),
}
let data = Data::Struct { field: 100 };
if let Err(e) = data.validate() {
println!("invalid data: {e}");
}
```
### Available validation rules
| name | format | validation | feature flag |
|--------------|-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------| -------------- |
| required | `#[garde(required)]` | is value set | - |
| ascii | `#[garde(ascii)]` | only contains ASCII | - |
| alphanumeric | `#[garde(alphanumeric)]` | only letters and digits | - |
| email | `#[garde(email)]` | an email according to the HTML5 spec[^1] | `email` |
| url | `#[garde(url)]` | a URL | `url` |
| ip | `#[garde(ip)]` | an IP address (either IPv4 or IPv6) | - |
| ipv4 | `#[garde(ipv4)]` | an IPv4 address | - |
| ipv6 | `#[garde(ipv6)]` | an IPv6 address | - |
| credit card | `#[garde(credit_card)]` | a credit card number | `credit-card` |
| phone number | `#[garde(phone_number)]` | a phone number | `phone-number` |
| length | `#[garde(length(<mode>, min=<usize>, max=<usize>)]` | a container with length in `min..=max` | - |
| matches | `#[garde(matches(<field>))]` | a field matches another field | - |
| range | `#[garde(range(min=<expr>, max=<expr>))]` | a number in the range `min..=max` | - |
| contains | `#[garde(contains(<string>))]` | a string-like value containing a substring | - |
| prefix | `#[garde(prefix(<string>))]` | a string-like value prefixed by some string | - |
| suffix | `#[garde(suffix(<string>))]` | a string-like value suffixed by some string | - |
| pattern | `#[garde(pattern("<regex>"))]` | a string-like value matching some regular expression | `regex` |
| pattern | `#[garde(pattern(<matcher>))]` | a string-like value matched by some [Matcher](https://docs.rs/garde/latest/garde/rules/pattern/trait.Matcher.html) | - |
| dive | `#[garde(dive)]` | nested validation, calls `validate` on the value | - |
| skip | `#[garde(skip)]` | skip validation | - |
| custom | `#[garde(custom(<function or closure>))]` | a custom validator | - |
Additional notes:
- `required` is only available for `Option` fields.
- For `length` and `range`, either `min` or `max` may be omitted, but not both.
- `length` and `range` use an *inclusive* upper bound (`min..=max`).
- The `<mode>` argument for `length` is [explained here](#length-modes)
- For `contains`, `prefix`, and `suffix`, the pattern must be a string literal, because the `Pattern` API [is currently unstable](https://github.com/rust-lang/rust/issues/27721).
- Garde does not enable the default features of the `regex` crate - if you need extra regex features (e.g. Unicode) or better performance, add a dependency on `regex = "1"` to your `Cargo.toml`.
If most of the fields on your struct are annotated with `#[garde(skip)]`, you may use `#[garde(allow_unvalidated)]` instead:
```rust
#[derive(garde::Validate)]
struct Foo<'a> {
#[garde(length(min = 1))]
a: &'a str,
#[garde(skip)]
b: &'a str, // this field will not be validated
}
#[derive(garde::Validate)]
#[garde(allow_unvalidated)]
struct Bar<'a> {
#[garde(length(min = 1))]
a: &'a str,
b: &'a str, // this field will not be validated
// note the lack of `#[garde(skip)]`
}
```
### Length modes
The `length` rule accepts an optional `mode` argument, which determines what _kind_ of length it will validate.
The options are:
- `simple`
- `bytes`
- `graphemes`
- `utf16`
- `chars`
The `simple` is the default used when the `mode` argument is omitted. The meaning of "simple length"
depends on the type. It is currently implemented for strings, where it validates the number of bytes,
and `std::collections`, where it validates the number of items.
```rust
#[derive(garde::Validate)]
struct Foo {
#[garde(length(min = 1, max = 100))]
string: String,
#[garde(length(min = 1, max = 100))]
collection: Vec<u32>
}
```
The `bytes`, `graphemes`, `utf16`, and `chars` exist mostly for string validation:
- `bytes` validates the number of _bytes_
- `graphemens` uses the [`unicode-segmentation`](https://docs.rs/unicode-segmentation) crate, and validates the number of _graphemes_
- `utf16` uses [`encode_utf16`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.encode_utf16), and validates the number of UTF-16 _code points_
- `chars` uses [`chars`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.chars), and validates the number of _unicode scalar values_
```rust
#[derive(garde::Validate)]
struct Foo {
#[garde(length(bytes, min = 1, max = 100))]
a: String, // `a.len()`
#[garde(length(graphemes, min = 1, max = 100))]
b: String, // `b.graphemes().count()`
#[garde(length(utf16, min = 1, max = 100))]
c: String, // `c.encode_utf16().count()`
#[garde(length(chars, min = 1, max = 100))]
d: String, // `d.chars().count()`
}
```
### Inner type validation
If you need to validate the "inner" type of a container, such as the `String` in `Vec<String>`, then use the `inner` modifier:
```rust
#[derive(garde::Validate)]
struct Test {
#[garde(
length(min = 1),
inner(ascii, length(min = 1)), // wrap the rule in `inner`
)]
items: Vec<String>,
}
```
The above type would fail validation if:
- the `Vec` is empty
- any of the inner `String` elements is empty
- any of the inner `String` elements contains non-ASCII characters
To validate a deeply-nested type, such as `Vec<Option<String>>`, the `inner` modifier must be nested for each level of generics:
```rust
#[derive(garde::Validate)]
struct Test {
#[garde(
length(min = 1), // applies to `Vec`
inner(inner(ascii, length(min = 1))), // applies to `String`
)]
items: Vec<Option<String>>,
}
```
You can apply separate rules to every level of the nested type:
```rust
#[derive(garde::Validate)]
struct Test {
#[garde(
length(min = 1), // applies to `Vec`
inner(required), // applies to `Option`
inner(inner(ascii, length(min = 1))), // applies to `String`
)]
items: Vec<Option<String>>,
}
```
### Newtypes
The best way to re-use validation rules on a field is to use the [newtype idiom](https://doc.rust-lang.org/rust-by-example/generics/new_types.html)
with `#[garde(transparent)]`:
```rust
#[derive(garde::Validate)]
#[garde(transparent)]
struct Username(#[garde(length(min = 3, max = 20))] String);
#[derive(garde::Validate)]
struct User {
// later used with `dive`:
#[garde(dive)]
username: Username,
}
```
The `username` field in the above example will inherit all the validation rules from the `String` field on `Username`. The result is that the error path will be flattened by one level, resulting in cleaner error messages:
```rust,ignore
User {
username: Username("")
}.validate()
"username: length is lower than 3"
```
Without the `#[garde(transparent)]` attribute, it would instead be:
```rust,ignore
User {
username: Username("")
}.validate()
"username[0]: length is lower than 3"
```
Structs with the `#[garde(transparent)]` attribute may have more than one field, but there must be only one unskipped field. That means every field other than the one you wish to validate must be `#[garde(skip)]`.
### Handling Option
Every rule works on `Option<T>` fields. The field will only be validated if it is `Some`. If you additionally want to validate that the `Option<T>` field is `Some`, use the `required` rule:
```rust
#[derive(garde::Validate)]
struct Test {
#[garde(required, ascii, length(min = 1))]
value: Option<String>,
}
```
The above type would fail validation if:
- `value` is `None`
- the inner `value` is empty
- the inner `value` contains non-ASCII characters
### Custom validation
Validation may be customized via the `custom` rule, and the `context` attribute.
The context may be any type without generic parameters. By default, the context is `()`.
```rust,ignore
#[derive(garde::Validate)]
#[garde(context(PasswordContext))]
struct User {
#[garde(custom(is_strong_password))]
password: String,
}
struct PasswordContext {
min_entropy: f32,
entropy: cracken::password_entropy::EntropyEstimator,
}
fn is_strong_password(value: &str, context: &PasswordContext) -> garde::Result {
let bits = context.entropy.estimate_password_entropy(value.as_bytes())
.map(|e| e.mask_entropy)
.unwrap_or(0.0);
if bits < context.min_entropy {
return Err(garde::Error::new("password is not strong enough"));
}
Ok(())
}
let ctx = PasswordContext { /* ... */ };
let user = User { /* ... */ };
user.validate(&ctx)?;
```
The validator function may accept the value as a reference to any type which it derefs to.
In the above example, it is possible to use `&str`, because `password` is a `String`, and `String` derefs to `&str`.
The `#[garde(custom(...))]` attribute accepts any expression which evalutes to a something which implements the following trait:
```rust,ignore
FnOnce(&T, &<T as Validate>::Context) -> garde::Result
```
That means it's possible to use higher order functions:
```rust
// Returns a function which does the actual validation.
fn my_equals(other: &str) -> impl FnOnce(&str, &()) -> garde::Result + '_ {
move |value, _| {
if value != other {
return Err(garde::Error::new(format!("not equal to {other}")));
}
Ok(())
}
}
#[derive(garde::Validate)]
struct User {
#[garde(length(min = 1, max = 255))]
password: String,
// Combined with `self` access in rules:
#[garde(custom(my_equals(&self.password2)))]
password2: String,
}
```
### Context/Self access
It's generally possible to also access the context and `self`, because they are in scope in the output of the proc macro:
```rust
struct Limits {
min: usize,
max: usize,
}
struct Config {
username: Limits,
}
#[derive(garde::Validate)]
#[garde(context(Config as ctx))]
struct User {
#[garde(length(min = ctx.username.min, max = ctx.username.max))]
username: String,
}
```
### Implementing rules
Say you want to implement length checking for a custom string-like type.
To do this, you would implement one of the `length` traits for it, depending
on what kind of validation you are looking for.
```rust
#[repr(transparent)]
pub struct MyString(String);
impl garde::rules::length::HasSimpleLength for MyString {
fn length(&self) -> usize {
self.0.len()
}
}
#[derive(garde::Validate)]
struct Foo {
// Now the `length` check may be used with `MyString`
#[garde(length(min = 1, max = 1000))]
field: MyString,
}
```
Each rule comes with its own trait that may be implemented by custom types in your code.
They are all available under `garde::rules`.
### Implementing `Validate`
In case you have a container type for which you'd like to support nested validation (using the `#[garde(dive)]` rule),
you may implement `Validate` for it:
```rust
#[repr(transparent)]
struct MyVec<T>(Vec<T>);
impl<T: garde::Validate> garde::Validate for MyVec<T> {
type Context = T::Context;
fn validate_into(
&self,
ctx: &Self::Context,
mut parent: &mut dyn FnMut() -> garde::Path,
report: &mut garde::Report
) {
for (index, item) in self.0.iter().enumerate() {
let mut path = garde::util::nested_path!(parent, index);
item.validate_into(ctx, &mut path, report);
}
}
}
#[derive(garde::Validate)]
struct Foo {
#[garde(dive)]
field: MyVec<Bar>,
}
#[derive(garde::Validate)]
struct Bar {
#[garde(range(min = 1, max = 10))]
value: u32,
}
```
### Rule adapters
Adapters allow you to implement validation for third-party types without using a newtype.
An adapter may look like this:
```rust
mod my_str_adapter {
#![allow(unused_imports)]
pub use garde::rules::*; // re-export garde's rules
pub mod length {
pub use garde::rules::length::*; // re-export `length` rules
pub mod simple {
// re-implement `simple`, but _only_ for the concrete type &str!
pub fn apply(v: &str, (min, max): (usize, usize)) -> garde::Result {
if !(min..=max).contains(&v.len()) {
Err(garde::Error::new("my custom error message"))
} else {
Ok(())
}
}
}
}
}
```
You create a module, add a public glob re-export of `garde::rules` inside of it,
and then re-implement the specific rule you're interested in. This is a form of
[duck typing](https://en.wikipedia.org/wiki/Duck_typing). Any rule which you have
not re-implemented is simply delegated to `garde`'s impl.
It's quite verbose, but in exchange it is maximally flexible. To use the adapter,
add an `adapt` attribute to a field:
```rust,ignore
#[derive(garde::Validate)]
struct Stuff<'a> {
#[garde(
adapt(my_str_adapter),
length(min = 1),
ascii,
)]
v: &'a str,
}
```
The `length` rule will now use your custom implementation, but the `ascii` rule
will continue to use `garde`'s implementation.
### Integration with web frameworks
- [`axum`](https://crates.io/crates/axum): [`axum_garde`](https://crates.io/crates/axum_garde)
- [`actix-web`](https://crates.io/crates/actix-web): [`garde-actix-web`](https://crates.io/crates/garde-actix-web)
### Feature flags
| name | description | extra dependencies |
| -------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `derive` | Enables the usage of the `derive(Validate)` macro | [`garde_derive`](https://crates.io/crates/garde_derive) |
| `url` | Validation of URLs via the `url` crate. | [`url`](https://crates.io/crates/url) |
| `email` | Validation of emails according to [HTML5](https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address) | [`regex`](https://crates.io/crates/regex), [`once_cell`](https://crates.io/crates/once_cell) |
| `email-idna` | Support for [Internationalizing Domain Names for Applications](https://url.spec.whatwg.org/#idna) in email addresses | [`idna`](https://crates.io/crates/idna) |
| `regex` | Support for regular expressions in `pattern` via the `regex` crate | [`regex`](https://crates.io/crates/regex), [`once_cell`](https://crates.io/crates/once_cell) |
| `credit-card` | Validation of credit card numbers via the `card-validate` crate | [`card-validate`](https://crates.io/crates/card-validate) |
| `phone-number` | Validation of phone numbers via the `phonenumber` crate | [`phonenumber`](https://crates.io/crates/phonenumber) |
| `unicode` | Validation of grapheme count via the `unicode-segmentation` crate | [`unicode-segmentation`](https://docs.rs/unicode-segmentation) |
### Why `garde`?
Garde means guard in French. I am not French, nor do I speak the language, but `guard` was taken, and this is close enough :).
### Development
Contributing to `garde` only requires a somewhat recent version of [`Rust`](https://www.rust-lang.org/learn/get-started).
This repository also makes use of the following tools, but they are optional:
- [`insta`](https://insta.rs/) for snapshot testing ([tests/rules](./garde_derive_tests/tests/rules/)).
- [`just`](https://just.systems/) for running recipes defined in the [`justfile`](./justfile).
Run `just -l` to see what recipes are available.
### License
Licensed under either of
- Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT license
([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.
### Acknowledgements
This crate is heavily inspired by the [validator](https://github.com/Keats/validator) crate. It is essentially a full rewrite of `validator`.
The creation of this crate was prompted by [this comment](https://github.com/Keats/validator/issues/201#issuecomment-1167018511)
and a few others talking about a potential rewrite.
[^1]: [HTML5 forms - valid email address](https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address)
ÁÌÍÑÀUÏ UŸÅê31U®ÆÜ2BUÇ—ESUìɾDeUàʽwUøËÿ.‰UÛUUUl(ü  Error types used by `garde`.Á!úü%85 The entrypoint of this module is the [`Error`] type.Á,0:KŸ×Ø®¾o»!…glª© #ToCompactStringÁ|¹·$SmallVecÁDÙˆ%ú/$÷ç&\t<xçswapÁ$ ×L ÐK0†JD57')t%¥

ÍìÕ_ µ_
¤ÆÍ_ 
Õ_Ô°· _Èf  »
Õ_ôìˆ ˆ_  ü
Õ_ü±&4¸ _Õ__  ¿
Õ_»ü›!Š Š_Ïêó üD»¦®ÔoÄïŠÕ_  §
Õ_´ÙÚ¥Íìòa íòaÚŒö®aD»¦®ÔoÄïé241$ö Úççú/éüêµ\Õ3¸`V7òaÔ $ Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ†J†JK‰Jµ 7ŠJ§l7J¤7·0ØQdè©1½1ƒ»Qvíj¨òaÛjÔ­ $­ œá¼Ì Ú¥çß Õ ®aÑ üê !í Åà®a
Úòaêüÿ
$Ú¥çß ˆ ®aúMûM  Ähü (  ®aÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ®aúM Ê 
Úòa <closure_kind>Á<closure_signature>Á<upvars>Áòa ááÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙžç
¼å Ôå ñå   òaœç òa„…{~_b”ÏNœèBÿa()*,-¤Ðü‚ Create an empty [`Report`].Á×ÿa''
(üÚ2ü–?< Append an [`Error`] into this report at the given [`Path`].Á4ጠŒÿaÞcÑb' è'
)õ
é,ÿüó:üÃ+( Iterate over all `(Path, Error)` pairs.Á$ú ÿa+' ÿ'
*$€ ø”‰ $*8  *ÄlÄlÏÇlµ ™lÈl
end_or_lenÁ™lÉl¢w™lŒœjSž8ÞcÑbÍì8+ùMµíüŽ µíúM 8¦í¬— ­í¿Ãí(Ôí*ôš
üÖ ?< Returns `true` if the report contains no validation errors.ÁD¡
Ž Žÿa' ª
'
,
ü˜ -üå
.+ Converts into the inner validation errors.ÁTŸ ÿaªBªBö­B®i÷<®B÷<9)
-ÜnL¦íÛj''
- üå !ÿa/Åc/ü B  ÿa  c cˆ¢cµ
 `£c®i `àB¤GS
Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ŸÈŸÈ ÈÏ éBL. .
/$• ± ü½!ÿaÑb24ü«1²¯Ñb1¯331ÍìÓ󤿷Óó
2Óóú$&ìµ Ñb 1 Ä1
4üü Ñb6Åc6ü£>¦ Ñb  c cˆ¢cµ
 `£c®i `àB¤GS
íñ5 ª5
6± ±ü“ Ñbüö ‡f9Åc9ü> ˜ ‡f  c cˆ¢cµ
 `£c®i `àB¤GS
˜íñ8 ¤8
9 «üö@Œ€::ÎìüöeÄcÚøŒ“·Úø:Òø8åø-õø#ÒøJåø?õø5;;;ä½×d::
;ÚøüÝ%Äê ƒ ×  µ , Š   Œ,  Ž š, 8˜ & 8D
% œ- ž,  8¥ ¡& ¢8´£*¦, ©8whichÁ& ¯8¼*· º Õ 8, É Ê Ô Ë, Ì Í Ð, Î8˜ Ï$ Ñ
Ò Ó- Õ8ëŒ×8
é, í8¥ î ð Ï8 þ8ƒt  (8Û4$• š Å8Û4'°, ²8µúüð:Ú>¥?>?çß ù:òaŒüÄh@;@õ#%ܱ×d==
@ÚòaLôÞcBCDEGI´„ , ÞcAA
BÔæ í  ÞcÈfA ñ A
Cô¬!D³!š šÞcA ¼!A
D$½!üû!6"ÞcAFFAÍì †":Œ‰"
E componentÁLœ",.üº#>$Á# ÞcÞcAHH Ü#A³ Æ#ÄŒÉ#
G$Ý#Ü€Lã#$&üº%r4­%4Á%œ œÞcœJA Ñ%A
I$Ò%ø¡á%KI8ž ž I¿¿IntoIterÁÁ“yÂcurrentÁÃþÁ|pÞGØ-Ð×d 8÷gÈfÍì8J ŒMüæ%2úMí„ìú%ÃMŒ›&‡…Ú2®…$Á…I¼Ÿ(t¤(ÚLLˆˆšÙŠcapacityÁ“yñI˜êiP×d Ú÷gÈf³( Þ(Èfìä(ÞcOÀcOüˆ)B)žŸ Þc ž c cˆ¢cµ
 `£c®i `àB¤GS
ŸíñN )N
O$)± )¬Õ)TÜ)ÚQQßh™v§”ýÖ(Rç)tù)$ù)PP ÚÞcüœ*+ÚTTßhUÀcU¡*üÖ*BÙ* ¡¢  ßh ¡ c cˆ¢cµ
 `£c®i `àB¤GS
¢íñS Ý*S
UÚ$Þ*± ä*D„,U¼åVÔåVñåVVUV×d ÷gÜ‹üÃ-ÞcXÅcXüé->ì-£¤¥ £Þc ¤ c cˆ¢cµ
 `£c®i `àB¤GS
¥íñW ð-W
X$ñ-± ÷-l7¼ ## Validation rulesÁ,?Zhu§ºŽš­ºÐÛè¤ä  Alphanumeric validation.Á ú\!  ```rustÁô-  #[derive(garde::Validate)]ÁŒL  struct Test {Áô^  #[garde(alphanumeric)]Á”}  v: String,Á, <  ```Áž úü¢˜  The entrypoint is the [`Alphanumeric`] trait. Implementing this trait for a type allows that type to be used with the `#[garde(alphanumeric)]` rule.Á» úü¿M J This trait has a blanket implementation for all `T: garde::rules::AsStr`.Ád!]_ü',™ èZ[Ï ŸZ\d 'œ¤ üº@ ,Á ¦ ¦Õ_Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Ñb¥^^ Û »Û Ç _Õ_
]Õ_Á Ø  ß (*´é  __ÒøüéG _ÒøÒø```ü†( ¬‰ § §Úø_ Ÿ _
`Úø$  ü²! ¥bb»Û · èÕ_ Õ_c`c üÚ' ¬Ý ¨ ¨Õ_a ó a
cÕ_ ¦ c¼ådÔådñåddcdÕ_üÈ0 ¥ff»Û Í Í“ ¨ig`güÿ' ¬‚ © ©¨ie ˜ e
gÕ_$™ l/¬
 ASCII validation.Á
ú\
®ô&
ÁŒE
ç¼W
 #[garde(ascii)]Á”o
¦Ž,
ÁŽ<ˆ
ÏŽ
úü”Š
 The entrypoint is the [`Ascii`] trait. Implementing this trait for a type allows that type to be used with the `#[garde(ascii)]` rule.ÁŸ
úü£M
œ,7kmü',ý
èhiÏ,
Ÿhjdö
'œˆ
üž9

ª ªÕ_Õ’¥ll ¸
»Û «
mÕ_
kÕ_Á µ
 ¼
(*|¸

mmÒøü¸9
mÒøÒønnnüÎ!

« «Úøm à
m
nÚø
Ôó
¥pp»Û ø
Á•
Õ_qnqü”
t—
¬ ¬Õ_o ¦
o
qÕ_
üá"
¥ss»Û æ
•œ
¨itntüŠ
t
­ ­¨ir œ
r
tÕ_$
„>Ì  Substring validation.Á ú\ ®ì*  const STR: &str = "test";ÁH úôL ÁŒk çü}"  #[garde(contains("test"))]Á”  ¦Žü³  #[garde(contains(STR))]Á”Ó  w: String,Á ÁŽ ÏŽô úüø  The entrypoint is the [`Contains`] trait. Implementing this trait for a type allows that type to be used with the `#[garde(contains)]` rule.Á úüM œDFxzü',ç èuvÏ,€ Ÿuwdà 'œò üˆF , ®¯ ®Õ_ ¯Õ’¥yy ¥ »Û  zÕ_
xÕ_Á ¢ "$”Ï  zzÒøüÏJ zÒøÒø{{{üè/ Œë °± °Úø ±z ý z
{Úø ò
 ì› ¥}}»Û   Á• Õ_~{~ü¿. ŒÂ ²³ ²Õ_ ³| Ô |
~Õ_ ò
Û ü( ¥»Û ¢ ‘¥ ¨i{üÌ. ŒÏ ´µ ´¨i µ á 
Õ_ ò
è Ô  Inner type validation.Á ú\ ®ô+ ÁŒJ çü\& # #[garde(inner(length(min=1)))]Á¼ƒ  v: Vec<String>,Á, ÁŽ ÏŽ© úü­Ž  The entrypoint is the [`Inner`] trait. Implementing this trait for a type allows that type to be used with the `#[garde(inner(..))]` rule.Áú5,Ð ×ëŒ× : *,üì_  ¸ ¸Õ_¥¦ˆœŠŠˆ Œ »Û ù Íì¦ ü Íìœ ÿ Í쬭  Õ_®Œ£ Õ_®¢® ·“"¬­ ® ·¢® ·¬­ü®˜"
Õ_®¢®¬­Â,… ±  Ýß×ÙÑÓÍÏ”í  ¥ŒŒÒøüíŠ çß ý Òø"Òø(ŽŽÍìÚøòaä† :ƒ±Œ û°–±Žeg܆  ü¨M  » »Úø ½ Íì޲ º ¹º“"޲ ¹òa ºƒ±¬ß ¹º޲ಘ"
ŽÚøòa޲ ± Ä wyÜù ¥»Û þ ›j’ŽD›   Èfü²M  ¾ ¾›j Ç ÍìÜ´ Ä ¼½“"Ü´ ¼Õ_ ½›jÕ_¬é ¼½Ü´®µ˜"
Õ_Ü´ ± Î |~ü¹+ Ÿ¥ŸÈft¾ çß Î ‘k™šŽš! Ä Èf!# ð Èfü‚M t… Á Á‘k޲  º²  ¿À“"޲ ¿òa À‘kòa¬¹ ¿À޲œ¸˜"
šŸòa޲ ± ž ü‰ Ú¥žžçß  ¤kŸ Ž Ž ! µ œœÈfüÇQ  Ä Ä¤k޲œ¡¡ Ü œº² Ù ÂÓ"޲ Âòa äkòa¬‚ ÂÃ޲ÿº˜"
 Úòa޲ ± ç ô†
¥££»Û
¨i¤¥Ž¥
°
¢¢‡füÂ
Q
Ç Ç¨iÜ´¢¦¦ ×
¢ˆµ Ô
ÅÆ“"Ü´ ÅÕ_ ƨiÕ_¬ý
ÅÆÜ´ͽ˜"
¥Õ_Ü´
± â
|~
 IP validation.Á
ú\
®ô#
ÁŒB
ç¤T
 #[garde(ip)]Á”i
¦Ž,|
ÁŽ<
ÏŽŠ
úüŽ
 The entrypoint is the [`Ip`] trait. Implementing this trait for a type allows that type to be used with the `#[garde(ip)]` rule.Á
úü—M
œÅ«­êt<ô
Äc§¨ü',‰
è§©Ï
Ÿ§ªŒê
@d
1œ”
"üªC

È ÈÕ_ÆkÕ’¥¬¬ Á
»Û ·
­Õ_º
«Õ_Á ¾
$&
û
­­Òøüñn
­ÒøÒø®¯®¯ÍìÚø®¤„
ÄcÀÃ<
¸ÃÐ
,‰
­­üž?

É ÉÚøÆkÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Àí ­
­
¯Úø
$´
¼¦
Æk±Åc±üÄB
Ç
ÊËÌ ÊÆk Ë c cˆ¢cµ
 `£c®i `àB¤GS
Ìíñ° Ë
°
±
± Ò
¼·
¥³³»Û ¼
Á•,¿
Õ_´µ®¯µ!#

²²‡¼‡¼ˆ¼AddrParseErrorÁ‰¼ˆçR Á¥]|ûÇü >
\„
Í ÍÕ_ÆkÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Õ_®²
²
µÕ_$
$—
äÄ
¥··»Û É
¼ÂÌ
¨i¸¹®¯¹!#
¸Éüƒ
>
\†
ΠΨiÆkÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
¨i®

¹Õ_$“
$™
´ Length validation.Áú\®ô'ÁŒFçüX(% #[garde(length(min=1, max=100))]Á¦Ž,”ÁŽÏŽ¢úü¦Š The concept of "length" is somewhat complicated, especially for strings. Therefore, the `length` rule currently supports different modes:Áü´63 - [`Simple`][simple::Simple], which is the defaultÁìë - [`Bytes`][bytes::Bytes]Áì‰ - [`Chars`][chars::Chars]Áü§)& - [`Graphemes`][graphemes::Graphemes]ÁüÑ/, - [`Utf16CodeUnits`][utf16::Utf16CodeUnits]Áúü…0- The mode is configured on the `length` rule:Á®ôÂÁŒáç„ó
#[garde(Áü„-* length(graphemes, min=1, max=25),Áü²*' length(bytes, min=1, max=100),Á )]Á”覎ÁŽ<ÏŽúüUR Here's what implementing the trait for a custom string-like type might look like:Á®Äï #[repr(transparent)]Áäˆ struct MyString(String);Á¥úü©=: impl garde::rules::length::HasSimpleLength for MyString {Áüç# fn length(&self) -> usize {ÁÄ‹ self.0.len()ÁÁŽÏ޼úüÀ(% See each trait for more information.Áéú»ÏàüÇÎýÛß³
ìû Œý
ˆÏ ŸºŒüGD Implemented by types for which we can retrieve the number of bytes.ÁHúüL`] See also: [`chars` on `str`](https://doc.rust-lang.org/std/primitive.str.html#method.chars).Á½¿ÇÏŸ»¼œ²üÈNÏ ÏÕ_ÈfÈfÕ’¥¾¾ â»Û Õ¿Õ_
½Õ_Á ß$&|¿¿¿Òøü¿b¿ÒøÒøÀÀÀüÕJ”ØÐ ÐÚøÈfÈfÕ’¿ ë¿
ÀÚøminÁòmaxÁþ죥ÂÂ»Û ¨ÇÕ_Õ_ÃÀÃ!#üÇI”ÊÑ ÑÕ_ÈfÈfÕ’Á ÝÁ
ÃÕ_ðÚäûÚðüÑ"¥ÅÅ»Û Ö”Ú¨iÆÀÆüúI”ýÒ Ò¨iÈfÈfÕ’Ä Ä
ÆÕ_$‘ðÚûÚ£”ÁÇÇÒøüÁ8ÇÒøÒøÈÈÈìÚÓ ÓÚøÈfÇ çÇ
ÈÚøÌû  Ö  ¼, œ  ´8ž  , ¡8& ª8 ³- µ, ·8¥ ¸& ¹8´º*¾ Á Ó 8 Ï, Ð Ñ Û, Ò8- Ü Ý88
è, ì8¥ í ï Í8 ý8ÆL€   Š8$‹(8¬,” š Ã8 °8± ´ µ% Ôü– )ŸËËʶt› ÈqÍÈÍ ¡ ÈfäÆ  Ô ÔÈqÈfÊ Ó Ê
ÍŸ |… úl— üš Implemented by string-like types for which we can retrieve the number of [Unicode Scalar Values](https://www.unicode.org/glossary/#unicode_scalar_value).Ážúü¢`¬×ÑÓÛÏ,–ŸÏМˆüžNÕ ÕÕ_äÙÕ’¥ÒÒ ¸»Û «ÓÕ_
ÑÕ_Á µ$&|•ÓÓÒøü•bÓÒøÒøÔÔÔü«J”®Ö ÖÚøÈfÈfÕ’Ó ÁÓ
ÔÚøðÚÈûÚÔìù¥ÖÖ»Û þÛÕ_DÕ_×Ô×!#üI” × ×Õ_ÈfÈfÕ’Õ ³Õ
×Õ_ðÚºûÚÆü§"¥ÙÙ»Û ¬²ç¨iÚÔÚüÐI”ÓØ بiÈfÈfÕ’Ø æØ
ÚÕ_ðÚíûÚù”—ÛÛÒøü—8ÛÒøÒøÜÜÜì°Ù ÙÚøÈfÛ ½Û
ÜÚøÜÑ í ¹  ó , ô õ 8ö ù, ú8& ƒ8D„ Œ- Ž, 8¥ & 8´* š  8 ¨, © ª ´, «8- µ 8ýD¸8
Á, Å8¥ Æ È ° 8 Ö8 â è ã8(ê8¬ ó ¦ 8$…  8Š   8ü,   ˜ % · ÌØ   ò  ³
 ø  , ù  ú  8û  ý , þ 8Dÿ & 8Dˆ  - , 8¥ & 8´ *  ž  °
 8  ¬ , ­  ®  ¸ , ¯ 8 - ¹  º 8ý 8
Å , É 8¥ Ê  Ì  ª
8 Ú 8  æ  ì  ç 8 (î 8¬  ÷   
8$‰

8Ž


% ±
¸t­
ü30 Implemented by types which have a known length.Á4úü80- The meaning of "length" depends on the type.ÁüiXU For example, the length of a `String` is defined as the number of _bytes_ it stores.Á
âäìÏŸàáœÇüÝOÚ ÚÕ_äÙÕ’¥ãã ø»Û êäÕ_
âÕ_Á õ$&„ÒääÒøüÒ`äÒøÒøåååüéGÛ ÛÚøÈfÈfÕ’ä üä
åÚøðÚƒûÚü´%¥çç»Û ¹ìÕ_Õ_èåè!#üàFÜ ÜÕ_ÈfÈfÕ’æ óæ
èÕ_ðÚúûÚüä$¥êê»Û é¡÷¨iëåëüF|’Ý Ý¨iÈfÈfÕ’é ¢é
ëÕ_ðÚ©ûÚµÌÐììÒøüÐ<ìÒøÒøíííÔðÞ ÞÚøÈfì úì
íÚøÜŽt› ª ¦  ° Ñ, ± ² É8³ µ, 8& ¿8 È- Ê, Ì8¥ Í& Î8´Ï*Ó Ö £  8 ä, å æ ð, ç8- ñ ò8³8
, ˆ8¥   8 8µ ¢ ¨ £8(ª8¬,­ ³ 
8#Å8'Î8Ã'Õ8D×8à8 ã% ä8 ú8Æ  % ¤ ÌÅ   ß  Ô å  8æ  è , é 8 & ò 8 $ û , ý  þ  , ÿ 8genericÁ<€ & 8¼,ˆ $ Ž 
 , 8¥ & 8´ *  œ  ½
8  ª , « 8 $ ´ ,  ·  À , ¸ 8£ $ Á 
  à 8³ 8
Õ , Ù 8¥ Ú  Ü  ·
8 ê 8µ  ó  ù  ô 8 (û 8¬ 
 ­
8$
 š
8
 ž
 Ÿ
% ¾
 Ä
 â
 8Å
 Ç
, È
 É
 Ø
, Ê
8£
& Ò
8¼
$ Ù

Ú
 Û
, Ý
8¥ Þ
& ß
8´à
*ä
 ç
 ý 8
 õ
, ö
 ÷
 , ø
8£
$ 
 ƒ8³|…8
, 8¥ š œ ÷8 ª8µ ³ ¹ ´8(»8¬ Ä í8 Ú8Û Þ ß% þ  ¡ 8 , ˆ8D‰& 8D š, œ8¥ & ž8´Ÿ*£ ¦ ¸
8 ´, µ8 ¾8³8
Ð, Ô8¥ Õ × ²8 å8µ î ô ï8(ö8¬ ÿ ¨8$‘ 8  š% ¹ ¿ Å, À8¥ Á& Â8´Ã*Ç Ê Ñ88³8
é, í8¥ î ð Ë8 þ8µ4   ˆ8$‰(8¬,’ ˜ Á8 ®8¯ ² ³% Òü¼)Ÿñ¥òñòʶçß Ñ‘kôåô ÇÈfüìFß ß‘kÈfÈfÕ’ð ÿð
ôŸòa$€ðÚûÚüí1ÚöŸ÷¥øöø÷ŸÈftöÍìÆv ¿vúåúò( üÈf "ü¥Fà à¿vÈfÈfÕ’õ ¸õ
úÚŸÆvðÚ¿ûÚ˼Å

ü]Z Implemented by string-like types for which we can retrieve length in _UTF-16 code units_.Á
þˆÏ,qŸüýœcüyW,€á áÕ_äÙÕ’¥ÿÿ œ»Û Õ_t‰
þÕ_Á $&ÄþÒøüþpÒøÒøüO¼ â âÚøÈfÈfÕ’ ¸
ÚøðÚ¿ûÚËüð/¥ƒƒ»Û õˆÕ_ŒøÕ_„!#ü¦N¼©ã ãÕ_ÈfÈfÕ’ Á
Õ_ðÚÈûÚÔüº4¥»Û ¿þ’¨i‡üõN¼øä ä¨iÈfÈfÕ’ 
Õ_$‘ðÚû򣆮ŒÐˆˆÒøüÆFˆÒøÒøüè"å åÚøÈfˆ úˆ
Úø¬ŽD› ¤  ª Ë, « ¬ Ã8­ ¯, °8& ¹8 Â- Ä, Æ8¥ Ç& È8´É*Í Ð  8 Þ, ß à ê, á8- ë ì8 Œî8
, 8¥   û8 8Û  ¦ ¬ §8(®8¬ · ñ8 Í8 encode_utf16Á Ú Û Ü8ü â ã% Äö
Ã"œ• ¸"ü« E ºÈfÈfÈfÕ’
¸ ðÚÄ ûÚÐ ô Field matching validation.Áú\#®ô/ÁŒNç´` #[garde(skip)]Á¤w foo: String,ÁôŒ #[garde(matches(foo))]Á¤« bar: String,ÁÁŽÏŽÎúüÒŽ The entrypoint is the [`Matches`] trait. Implementing this trait for a type allows that type to be used with the `#[garde(matches)]` rule.ÁáúüåIF This trait has a blanket implementation for all `T: PartialEq<O>, O`.ÁÏŸŽÅüÃVæçè æÕ_ ç èã€Õ’¥  å»Û ÐÍì〠ßÕ_ã€
Õ_ã€Á â=?9;¤ ÒøüKï¢ ¯Òø!Òø'•*,ü¸.„»éê éÚø ê〠Ì
Úøã€¹
üê)¥ ˜˜»Û ïï¢ µßÕ_ã€Õ_™.035üš-ëì ëÕ_ ì〠®
Õ_〹
¼ Pattern validation.Áúü£  The pattern argument can be a regular expression provided as a string literal, which is then parsed by the [`regex`] crate (if the `regex` feature is enabled).ÁÀú®ôÐÁŒïçü63 #[garde(pattern(r"[a-zA-Z0-9][a-zA-Z0-9_]+"))]Á”¸¦ŽÁŽÏŽÙúüÝvs Alternatively, it can be an expression of type implementing [`Matcher`] or one that dereferences to a [`Matcher`].ÁüÔˆ [`Matcher`] is implemented for `regex::Regex` (if the `regex` feature is enabled) and `once_cell::sync::Lazy<T>` with any `T: Matcher`.ÁüàŠ Please note that the expression will be evaluated each time `validate` is called, so avoid doing any expensive work in the expression.ÁüëŠ If the work is unavoidable, at least try to amortize it, such as by using `once_cell::Lazy` or the nightly-only `std::sync::LazyLock`.Áöú®ô† use once_cell::sync::Lazy;Á¬¥ use regex::Regex;Á»úü¿a^ static LAZY_RE: Lazy<Regex> = Lazy::new(|| Regex::new(r"[a-zA-Z0-9][a-zA-Z0-9_]+").unwrap());Á¡úô¥ÁŒÄçüÖ" #[garde(pattern(LAZY_RE))]Á”ù¦ŽÁŽ<’ ÏŽš úüž “ The entrypoint is the [`Pattern`] trait. Implementing this trait for a type allows that type to be used with the `#[garde(pattern(...))]` rule.Á²
úü¶
Mœ ¢ü', èšÏ Ÿšœd‰ +œ› ü± O íî íÕ_ îžÕ’¥žžŸžŸ Ù »Û ¾ Íì÷³ Ê ¢Õ_  ÷³ 
Õ_÷³Á Ö IKEGı

  Òøü±
±èÚø
 Òø*ÀµÒø6Àµ¡¡üµ+üÐ
`] Returns true if and only if there is a match for the pattern anywhere in the haystack given.ÁD¸ïð ïÚø ð  Á 
¡ÚøhaystackÁDÈŒä¢¢ÒøüäV¢ÒøÒø£££üü<„ÿñò ñÚø ò÷³¢ž¤¤ œ¢¶´ Ö´<“
£Úø÷³$matcherÁ<£/1ä¼¥¦¦»Û ÁÁ•Õ_§£§üß;„âóô óÕ_ ô÷³¥ž¨¨ ÿ¥¶´ óÖ´
§Õ_÷³$€ø<†(*üÎ&¥ªª»Û ÓÇ´¨i«£«üû;„þõö õ¨i ö÷³©ž¬¬ ©¶´ Ö´<’
«Õ_÷³ø(*´ Prefix validation.Áú\®ô' const PRE: &str = "test_";ÁFúôJÁŒiçü{! #[garde(prefix("test_"))]Á¦Žì° #[garde(prefix(PRE))]Á”Îÿ ÁŽÏŽïúüóŒ The entrypoint is the [`Prefix`] trait. Implementing this trait for a type allows that type to be used with the `#[garde(prefix)]` rule.Áúü„Mœ°²ü',Þ譮ϟ­¯+œéüÿD,†÷ø ÷Õ_ øÕ’¥±± š»Û Œ²Õ_4
°Õ_Á $&„˲²ÒøüËF²ÒøÒø³³³üâ-ùú ùÚø ú² õ²
³Úøò
üÜ“¥µµ»Û ˜Á•,›Õ_¶³üµ,ûü ûÕ_ ü´ È´
Õ_ò
Ïü”$¥¸¸»Û ¤Â¨i¹³¹ü¿,ýþ ý¨i þ· Ò·
¹Õ_ò
Ù¬ Range validation.Áú\®ô&ÁŒEçüW'$ #[garde(range(min=10,max=100))]Á| v: u64,Á,ÁŽ<•ÏŽúü¡ The entrypoint is the [`Bounds`] trait. Implementing this trait for a type allows that type to be used with the `#[garde(range(...))]` rule.Á²úü¶>; This trait is implemented for all primitive integer types.Á½¿Ät<„Äcº»ÏŸº¼Œú+œ’ü²nÿ ÿÕ_Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÒ§ŸËÕ’¥¾¾ Ò»Û ¿¿Õ_
½Õ_Á Ï$&äÿ4‰¿¿ÒøüÿŠíßÚøÚøT‘¿Òø/ìÌÒø;ìÌÁÂÃÀÁÂÃÍìÚøÀŠ ÂÍÄcÂͺÍ(ÒÍâÍÃü¢!¿¿¬Êп¿Âͬåë¿¿ÂÍü|„ € ÚøÂÍÂÍÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ÄÅÆÁ%ÇÈÓ%åO¨»í
(g¿ ¿
ÃÚø lower_boundÁ\¬ upper_boundÁ\ͤ‹ \” áÏåO¨»í
(gÅÆÇÈÆÈÄÄáÏÄÄáÏÄÄáÏÄÄáÏÌ»  Õ  ­ Û  é , Ü  Ý  æ , Þ 8¥ ß & à 8¼$ ç 
è *ë  î  ª, ø  ù  £8$‡
8ç$
8

,
8¥ ˜
 š
 )8!
8õ$

, ¸
8¥ ¹
% º
8
8%Ó
& Ö
8
'Ü
8õ$
 ã
, å
8¥ æ
'ç
8%é
% ì
8
8Œ% & 8$‰ ' 8õ$$  , 8¥ '˜ 8Œ%š % 8 ° 8—%    É  Ø 8 $ Ý 8½Ï & þ 8$€ ' 8õ$$† $ Š 8ÐÏ\  & « 8$­ '± 8õ$ $ · (Ë 8Í  Ô  Õ  Ö $ × 8®%  ä  æ  8ü 8$ÿ 

8½Ï\‡

 Ù
8­
 °
 Ã
8®%
'¼
8Á%
8
8à
8
 è
 ê
8ÐÏ
 ÷
 ½8  §8®%\•' 8Ó%8$¿ Ä ù8«Þ à ã á â
¤% «üŠ$¥ËË»Û ”Ì4’¨iÌÍÎÏÀÁÂÃÏ/1ÊÊÒ§¬ÏÕÊʨiÀ¬óùÊÊ­Ûü˜|›   ¨i­Û­ÛÏÊ ´Ê
ÏÕ_½ÏÐÏ„ÑÔÖÏ, ŸÐÒÅÍ4ÌÐÓ,,.ü1,$ ‚ Õ_Õ’¥ÕÕ :»Û *ÖÕ_D-
ÔÕ_Á 7 >&(”¥ÖÖÒøü¥4ÖÒøÒø×××̾ƒ  ƒ ÚøÖ ÈÖ
×ÚøôÛ¥ÙÙ»Û à¨iÚ×ÚÄ€ „ ¨iØ ŠØ
ÚÕ_$‹´ Suffix validation.Áú\®ô' const SFX: &str = "_test";ÁFúôJÁŒiçü{! #[garde(suffix("_test"))]Á¦Žì° #[garde(suffix(SFX))]Á”Îÿ ÁŽÏŽïúüóŒ The entrypoint is the [`Suffix`] trait. Implementing this trait for a type allows that type to be used with the `#[garde(suffix)]` rule.Áúü„MœÞàü',ÞèÛÜÏŸÛÝ+œéüÿD,† … Õ_ Õ’¥ßß š»Û ŒàÕ_4
ÞÕ_Á $&„ÃààÒøüÃFàÒøÒøáááüÚ-ˆ  ‡ Úø ˆ à íà
áÚøò
ôÜ‹¥ãã»Û Á•,“Õ_äáäü­,Š  ‰ Õ_ Š â Àâ
äÕ_ò
ÇüŠ$¥ææ»Û ½å4’¨içáçüµ,Œ  ‹ ¨i Œ å Èå
çÕ_ò
Ï|™èèÒøü™1èÒøÒøééé̯   Úø  è ¹è
éÚøÔÌÚëëÑfìéìÑÄíŽ  Ž Ñf Ž ê ÷ê
ìÚ¬žÃgîéîĺ   Ãg  í Äí
îüû,ÚððàfñéñÄ®   àf  ï ¸ï
ñÚ„Fü'$ ## Core validation traits and typesÁDNøìíàáp,7¿còópÂcòóê3$R®òõëŒX:òöÜ24wò÷Ç|-fdCDF46lp(”–ü€! The core trait of this crate.Á¢úü¦>; Validation runs the fields through every validation rules,Áüå0- and aggregates any errors into a [`Report`].ÁD øøÒøü–Ø øÒøÒø ùúûüùúûüÍìÚøùl—°òüûúd—ä¯ A user-provided context.ÁÐúüØ:7 Custom validators receive a reference to this context.Á<œøøüôRüªKH Validates `Self`, returning an `Err` with an aggregate of all errors ifÁÔú the validation failed.Áúü¡b_ This method should not be implemented manually. Implement [`Validate::validate_into`] instead,Áüˆgd because [`Validate::validate`] has a default implementation that calls [`Validate::validate_into`].ÁD÷ ‘ ÚøÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ÿaø ø³¸ò
úÚø$üô Bü¥KùòÔõÍóúüœbýóüƒ li because [`Validate::validate_with`] has a default implementation that calls [`Validate::validate_into`].Ál÷  ’ Úø “ ¸òüöø
ø
ûÚø$†
ctxÁŒ
üá ü– FC Validates `Self`, aggregating all validation errors into `Report`.Álä  ” Úø • ¸ò  “"˜"Þc  — ÿaø û ø
üÚø ùŠ
parentÁ4§
reportÁ4Ñ
Ôò¥þþ»Û ÷øÕ_ê‚ÿä´ä“ Returns the inner value.ÁT»ê‚Õ_ýý
ÿÕ_üë$¥»Û ðꂃê!ë!ƒ\–4›Õ_ü¬ ˜  ˜ ê‚ ˜ ê‚ê! µ
ƒÕ_ü¶ ¥»Û »ìüǃˆÄüÝ Creates an `Unvalidated<T>`ÁˆÕ_ǃ
Õ_Á Œü¶fü·85 Validates `self`, transforming it into a `Valid<T>`.Áüô=: This is the only way to create an instance of `Valid<T>`.ÁD½ǃÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ê‚ÿa³Õ_ù<”
Õ_üãVüä8‰€ü¡=Ë€ǃ ™ ’ƒ¥‚ ƒ
ˆÕ_ùþüƒ,¥ŠŠ»Û ˆìüD‹ǃë̶Õ_ǃ
Õ_»üï'¥»Û ô¿cÕ_ǃŽÀcŽ"$üB š œ  š ǃ  c cˆ¢cµ
 `£c®i `àB¤GS
œ íñŒ ¤Œ
ŽÕ_± «üŠ1Ú¥Îìòa øòaÄh’ùü.0òaùü⊠ž Ÿ     Äh ž Ähù Ÿ “"˜"ÞcŸ    ÿa ü
Úòaù¬ûºûüº5Ú¥ó‡ ȼ„˜ùü˜¿(*Јü– Šl™ ¡ ¢ £ ¤  ¡ ¼„ ¢ ¼„ù £ “"˜"Þc£  ¤ ÿa ° 
˜Úòaù¿ ¬ûºû4†!üî!1¥šš»Û ó!ìüDö!Í„œùüœ"$d¦"<«"’ƒüÆ"ŠlÉ"¥ ¦ § ¨  ¥ Í„ ¦ Í„ù § “"˜"Þc§  ¨ ÿa à"
œÕ_$á"ùï"¬û4Œ#ºû4¶#üž$-¥žž»Û £$ìüD¦$˜…Ÿ ùü "$dÒ$<×$’ƒüò$Šlõ$© ª « ¬  © ˜… ª ˜…ù « “"˜"Þc«  ¬ ÿa Œ%
 Õ_$%ù›%¬û4¸%ºû4â%üÊ&0¥¢¢»Û Ï&ìüDÒ&ë…£¤ùü¤"$d'<†'¡¡’ƒü¡'Šl¤'­ ® ¯ °  ­ ë… ® ë…ù ¯ “"˜"Þc¯  ° ÿa¡ »'¡
¤Õ_$¼'ùÊ'¬û4ç'ºû4‘(üù(”†) ™) ç- Ÿ) Ë)
  ), ¡)8¥ ¢)& £)8¼,¤), ª) «) º)$ ¬), ®)8¯,¯)& ´)8¼,µ)
») ¼), ¾)8 ContainerÁL¿)& È)8´É)*Í) Ð) ä-8$Ú) Þ), ß)8¥ à)$ á), ã) ä) ë), å)8¯,æ)$ ì)
í) î)8½Dð)8
ù), ý)8Ä”Lþ)8$,*, ¢*8¥ £*& ¤*8½D¦* ·* Þ- 8!$Å*8k<Ê* Ò*8¥ Ô*'Õ*8k<×*% Þ*8 í*8Ÿ)lð* ý* Ó+ þ*8$ÿ*$ ƒ+8ù…+& ˆ+ Š+8$+'+8k<+$ ˜+8š+8¬û4ž+& ¤+ ¦+8§+84«+8,¯+ ´+ µ+(·+8ê3$º+$ ¾+8ºû4À+& Æ+ È+8É+8Ü24Í+ Õ+ Ô- 8
ç+ ë+ ÷+8Ö,ì+$ ñ+8÷$ó+8ù+8$ü+ €,8ù$, …, †, ‡,8 enumerateÁLˆ, , , ”, Æ-8ª,8®,8õ
$², ·,, ¹,8,º,'¿,8.$Á,'Å,8 nested_pathÁ\Ç, Ò, Ó, á,8¬û4Ô,$ Ú,8Ö,Ü,% â, ø,8¥ ù,8û,8½Dþ, †-'‡-8Ÿ)l‰- - ³- 8÷$—-$ -8ù-$  - ¢-8£-8õ
$§-$ «-8ºû4­-% ´-% å-üÕ05¥§Ÿ¨¨§»Û Ú0Ètç0ìüDÝ0„‡ª«ùü«*,/ í0Èfd1<1¦¦’ƒü±1Žl´1± ² ³ ´  ± „‡ ² „‡ù ³ “"˜"Þc³  ´ ÿa¦ Ë1¦
«Õ_Ÿ$Ì1ùÚ1¬û4û1ºû4¥2ü›4 œ¨4 ¼4 ô< Â4 Ú4 , Ã48 Ä4& Å48¼,Æ4$ Ë4, Í4 Î4 ×4, Ï48¥ Ð4& Ñ48¼,Ò4$ Ø4
Ù4*Ü4 ß4 ò<8$é4 í4, î48 ï4$ ð4, ò4 ó4 ö4, ô48¥ õ4$ ÷4
ø4 ù48½Dû48
„5 ˆ5 ”5, ‰58 Š5$ 5, 5 Ž5 5, 58¥ 5$ 5
“58$,ž5, °58 ±5& ³58½Dµ5$ ½5, Ë5 Ì5 ð5
, Í58¥ Î5& Ð58½DÒ5 Ú58k<Û5 â5, ã58 ä5'å58k<ç5 î5$ ï5
ñ5 û5 ì<8!$‰68k<Ž6 6, ˜68 ™6'š68k<œ6% £6+ ²6 ³6 É68«,´6 ¹6 È68non_snake_caseÁtº68 ×68Ÿ)lÚ6 ç6 ½7 è68$é6$ í68ùï6& ò6 ô68$õ6'ù68k<û6$ 78„78¬û4ˆ7& Ž7 78784•78,™7 ž7 Ÿ7(¡78ê3$¤7$ ¨78ºû4ª7& °7 ²78³78Ü24·7 ¿7 â<68Ñ7 Õ7 á7, Ö78 ×7$ Ø7, Ú7 Û7 ß7, Ü78¥ Ý7$ Þ7
à7 ã78$å7% é78û78ÿ78Ö,ƒ8 ‰87ˆ¬48% 88£88_indexÁ4§8 ®88Ö,°8% µ88Ç88Ë88õ
$Ï8 Ô8, Ö88,×8'Ü88.$Þ8'â88‹›\ä8 ï8 ð8 ÿ88¬û4ñ8$ ÷88‘©4ù8% €9 9, “98 ”9898½D™9 ¡9'¢98Ÿ)l¤9 ±9 Ì9
, ²98 ³9$ ´98ù¶9$ ¹9 »98¼98õ