Compare commits
848 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0466546981 | ||
|
|
4e80dd009a | ||
|
|
028294cc8c | ||
|
|
628e241e23 | ||
|
|
e167b04b85 | ||
|
|
fbae35922d | ||
|
|
55b9758575 | ||
|
|
010b76eada | ||
|
|
d239592b58 | ||
|
|
0cf8b782ff | ||
|
|
25e147f6a0 | ||
|
|
a75343800c | ||
|
|
7d52fd66d0 | ||
|
|
5bbd826ae3 | ||
|
|
e4a7d0fd99 | ||
|
|
a1a18ffd21 | ||
|
|
587fd03d0e | ||
|
|
ce52ab8748 | ||
|
|
494edba245 | ||
|
|
2e861b95db | ||
|
|
7834e4709e | ||
|
|
8284676f50 | ||
|
|
2a79fa4c6c | ||
|
|
00b9e33508 | ||
|
|
2585529089 | ||
|
|
6a99181fec | ||
|
|
ea9caac249 | ||
|
|
764d057c32 | ||
|
|
4a537c087d | ||
|
|
015d31e6a1 | ||
|
|
854510a864 | ||
|
|
8466e390b8 | ||
|
|
baaafee4e4 | ||
|
|
9169f99674 | ||
|
|
47d5628a68 | ||
|
|
d54e7c04ea | ||
|
|
ff168f5d2d | ||
|
|
a8edb2871c | ||
|
|
d48b147b3d | ||
|
|
155eeb3637 | ||
|
|
8665b2da8c | ||
|
|
e5e1568196 | ||
|
|
8754013cbc | ||
|
|
a0f4e751bf | ||
|
|
fa2c69071c | ||
|
|
f99ce277da | ||
|
|
0b68c08852 | ||
|
|
58eec39cc8 | ||
|
|
6a2379ce78 | ||
|
|
33cea5603e | ||
|
|
285b0aae10 | ||
|
|
e868af9106 | ||
|
|
1a9e0d79e5 | ||
|
|
cb132b1cc4 | ||
|
|
99eccf3f30 | ||
|
|
fb9be2f5d2 | ||
|
|
779336f60c | ||
|
|
e091767278 | ||
|
|
aebddf443a | ||
|
|
7cc91b1308 | ||
|
|
14532e8bf5 | ||
|
|
2a3aa83928 | ||
|
|
82cae58794 | ||
|
|
71290acc62 | ||
|
|
ff9beb00fe | ||
|
|
c60dbd12a5 | ||
|
|
54c49a1644 | ||
|
|
9d3e6e6f33 | ||
|
|
5ee3c2afa0 | ||
|
|
1c02ee9299 | ||
|
|
0ff97448c2 | ||
|
|
420ea940bc | ||
|
|
fe1f5a0889 | ||
|
|
fd5b7a4aa8 | ||
|
|
8631eb1c79 | ||
|
|
d57d880770 | ||
|
|
bf276f29b8 | ||
|
|
54a31a65a7 | ||
|
|
788997c437 | ||
|
|
a451711e96 | ||
|
|
ef1d87427d | ||
|
|
fa7d3d9067 | ||
|
|
8c6532ca1b | ||
|
|
c7d462f909 | ||
|
|
a44ba5f88b | ||
|
|
d168fffb12 | ||
|
|
748d5987a5 | ||
|
|
26b084c161 | ||
|
|
f7a66f2075 | ||
|
|
7650953faf | ||
|
|
6cf42fbefa | ||
|
|
1e3f4520ef | ||
|
|
d649beacac | ||
|
|
bc8c364568 | ||
|
|
30387b26d9 | ||
|
|
1188b9a91e | ||
|
|
5a4cfa9505 | ||
|
|
174f36ad8f | ||
|
|
e6f84264e5 | ||
|
|
8f298be7fb | ||
|
|
5f0a0d6938 | ||
|
|
2632be2034 | ||
|
|
bbde68ddce | ||
|
|
8a44cdbc84 | ||
|
|
14b8b0e93a | ||
|
|
cca23b5479 | ||
|
|
09c4851118 | ||
|
|
5fdaa12c96 | ||
|
|
fec6b2b9f3 | ||
|
|
60911977f6 | ||
|
|
6c7ab5d79f | ||
|
|
3a6b792ca1 | ||
|
|
ffbd927d82 | ||
|
|
a72bc945fc | ||
|
|
8270c6a034 | ||
|
|
910e779b09 | ||
|
|
8740f475d7 | ||
|
|
4df1464f39 | ||
|
|
8ebb5e6dfd | ||
|
|
3b7467a5da | ||
|
|
262082f546 | ||
|
|
f8c84c258d | ||
|
|
e8e8309c2d | ||
|
|
e638807d33 | ||
|
|
ca05d99be4 | ||
|
|
1efacace9f | ||
|
|
1936861b91 | ||
|
|
f602e84fa6 | ||
|
|
e367f23c01 | ||
|
|
cb97e69074 | ||
|
|
490a4691cb | ||
|
|
ef64dd0768 | ||
|
|
c81a863e69 | ||
|
|
e7f1c04488 | ||
|
|
e83c6725dc | ||
|
|
95eea28c82 | ||
|
|
ac943da875 | ||
|
|
59e0509a58 | ||
|
|
44619fd24d | ||
|
|
7a29741f18 | ||
|
|
0d60e8b7c6 | ||
|
|
0f24120c9a | ||
|
|
1bb7109804 | ||
|
|
e2d58c112b | ||
|
|
61deab369b | ||
|
|
d30da6e8a0 | ||
|
|
e8366882ad | ||
|
|
664b27c4ca | ||
|
|
0506418157 | ||
|
|
a8846b897d | ||
|
|
f7b837af69 | ||
|
|
f6e3614fe9 | ||
|
|
f70fe61e05 | ||
|
|
a2dedcfed2 | ||
|
|
3759ca85ec | ||
|
|
90ceef9796 | ||
|
|
e2c5b45f4b | ||
|
|
290bf9d11f | ||
|
|
e7dbe8f3b0 | ||
|
|
b5b1233901 | ||
|
|
ca1f423323 | ||
|
|
dd94bbef37 | ||
|
|
1ad90b389f | ||
|
|
c00cfc601d | ||
|
|
13d37a0ef3 | ||
|
|
8161b628dd | ||
|
|
ea5f0bb731 | ||
|
|
48c496af1e | ||
|
|
8086867055 | ||
|
|
a70e523241 | ||
|
|
375013f60f | ||
|
|
4302ae2367 | ||
|
|
5a66e77581 | ||
|
|
8a59f5aa1a | ||
|
|
268499b0db | ||
|
|
2d3555fe0f | ||
|
|
fd96c47e09 | ||
|
|
05c8c4e261 | ||
|
|
db7da039fa | ||
|
|
fca76a7afb | ||
|
|
1ddab42edb | ||
|
|
a30ee05ca8 | ||
|
|
eae53362b2 | ||
|
|
a3590df20c | ||
|
|
36de54318d | ||
|
|
d063119d9c | ||
|
|
f4e631bce7 | ||
|
|
2c3321b68a | ||
|
|
3e3c027cd0 | ||
|
|
e503a5c8f9 | ||
|
|
703ebb4813 | ||
|
|
a426fabe13 | ||
|
|
0608ab9cab | ||
|
|
98fd4de30a | ||
|
|
4cb8296b02 | ||
|
|
1b500da585 | ||
|
|
7818599de1 | ||
|
|
19ad37073b | ||
|
|
cd5f9f8cc0 | ||
|
|
87d5c2441b | ||
|
|
63efc76f3e | ||
|
|
f6c24409f1 | ||
|
|
97af04a539 | ||
|
|
0a988768ab | ||
|
|
a6152b06c4 | ||
|
|
e8f4ca88a3 | ||
|
|
e1db84fd97 | ||
|
|
93c3e7dfae | ||
|
|
0b3302316b | ||
|
|
b808807198 | ||
|
|
6763eea1e3 | ||
|
|
904beeec6b | ||
|
|
c16519b38b | ||
|
|
8eb5a3f419 | ||
|
|
2293b32cce | ||
|
|
25d0685bdf | ||
|
|
fa47c82617 | ||
|
|
b6a238c67a | ||
|
|
462e982784 | ||
|
|
b8ec65b3ca | ||
|
|
1f2e0f336a | ||
|
|
aa956fbc47 | ||
|
|
02bd47ba29 | ||
|
|
708a019ce2 | ||
|
|
0288cc38fc | ||
|
|
b4e98a4dd1 | ||
|
|
b883c660fc | ||
|
|
4ae64c568b | ||
|
|
31e796c4e8 | ||
|
|
775e718dff | ||
|
|
39b00910ae | ||
|
|
2a59419bdf | ||
|
|
b846a2e909 | ||
|
|
75a0f0de95 | ||
|
|
d81236f71e | ||
|
|
129f1e6f76 | ||
|
|
798fdfe24c | ||
|
|
96122fa45a | ||
|
|
c71fd44454 | ||
|
|
86fccf082a | ||
|
|
12761bbfb1 | ||
|
|
88b930b5b1 | ||
|
|
c1222368b4 | ||
|
|
ea5f1884be | ||
|
|
a5832706bd | ||
|
|
d8b7ebaf47 | ||
|
|
9a500941d8 | ||
|
|
a7be8751dc | ||
|
|
2f622fc7bd | ||
|
|
a26d225d81 | ||
|
|
798a120926 | ||
|
|
c97572be3e | ||
|
|
36af4198ed | ||
|
|
e88b9be12b | ||
|
|
be19ed592d | ||
|
|
110eae7c19 | ||
|
|
a234c39e41 | ||
|
|
0ff1049eb7 | ||
|
|
f78586ff7b | ||
|
|
cc37f645ba | ||
|
|
5341de2163 | ||
|
|
fd5027a017 | ||
|
|
d43e63f562 | ||
|
|
a874fe9cb7 | ||
|
|
87ba51c936 | ||
|
|
95d521c81b | ||
|
|
91e29144b0 | ||
|
|
a3b104a2ed | ||
|
|
2008d09915 | ||
|
|
2599b9fe82 | ||
|
|
815f12df46 | ||
|
|
131a3c6af7 | ||
|
|
54ee621e41 | ||
|
|
19be14021b | ||
|
|
bd5a0b526b | ||
|
|
1934587253 | ||
|
|
3365aca12f | ||
|
|
bab00cb961 | ||
|
|
6022fc2aa1 | ||
|
|
15a9b4a3e7 | ||
|
|
a41d7de348 | ||
|
|
420d904ba9 | ||
|
|
446c788eb3 | ||
|
|
f688d20fe6 | ||
|
|
a02d4ff0dd | ||
|
|
8396a262c3 | ||
|
|
86a72ea127 | ||
|
|
9479f5f4f5 | ||
|
|
9aa27a75bd | ||
|
|
5fe6350c68 | ||
|
|
5810ae4f49 | ||
|
|
84bbec0666 | ||
|
|
94ba8b70b3 | ||
|
|
e5d1c7dbaa | ||
|
|
9b14628364 | ||
|
|
703a25efad | ||
|
|
17f5cc36ca | ||
|
|
9054b2d947 | ||
|
|
7ffbe1fb78 | ||
|
|
acdd66b4c5 | ||
|
|
faf10c64a9 | ||
|
|
ece9787822 | ||
|
|
7f6fe08b06 | ||
|
|
f5053f65bb | ||
|
|
c888142bcb | ||
|
|
bc0d673af0 | ||
|
|
2d16819cbf | ||
|
|
8053211bf4 | ||
|
|
bd432c470d | ||
|
|
44d89ecff4 | ||
|
|
d089176030 | ||
|
|
40a88f57f7 | ||
|
|
491d753edc | ||
|
|
c4e46b2f3e | ||
|
|
06e3feeee1 | ||
|
|
ea75f6ccc1 | ||
|
|
286aaffa31 | ||
|
|
91a18ebe97 | ||
|
|
c4910709d9 | ||
|
|
3e996a0f82 | ||
|
|
dac408627b | ||
|
|
f8bb4fa637 | ||
|
|
d2cebc3c2d | ||
|
|
a38b2fd943 | ||
|
|
b6cc8e2414 | ||
|
|
14867c7abc | ||
|
|
ef3bb7444b | ||
|
|
6c7c067662 | ||
|
|
19eff4755b | ||
|
|
eb7c5be7cc | ||
|
|
6fe1fb39fb | ||
|
|
0be3631788 | ||
|
|
f2e89140ed | ||
|
|
f44b5aa2d0 | ||
|
|
c6337398df | ||
|
|
b0c6c4195e | ||
|
|
5c1e2636c2 | ||
|
|
76da6b5468 | ||
|
|
f8e4a8b170 | ||
|
|
aaee0a6a2e | ||
|
|
9abb757c31 | ||
|
|
da78af20ac | ||
|
|
dddcffb633 | ||
|
|
c73a6b4a83 | ||
|
|
04010978a0 | ||
|
|
3163a92594 | ||
|
|
53ddd721a7 | ||
|
|
17212477c5 | ||
|
|
db289689b8 | ||
|
|
b2bb4e1888 | ||
|
|
618da006a5 | ||
|
|
228c43890f | ||
|
|
f71ed29e96 | ||
|
|
9d55331980 | ||
|
|
0b4221d7f3 | ||
|
|
12f412d915 | ||
|
|
7ea5c4d38c | ||
|
|
b45ab40b21 | ||
|
|
dea23211ae | ||
|
|
9b5cd9a1a4 | ||
|
|
1ebe7b01bc | ||
|
|
17a8c79e21 | ||
|
|
9c55fcfcbf | ||
|
|
7744335020 | ||
|
|
a9651788b2 | ||
|
|
9c2b9dc40f | ||
|
|
257390e78c | ||
|
|
f1675828d9 | ||
|
|
ff3787781e | ||
|
|
3460116d3b | ||
|
|
194e82433a | ||
|
|
4de40cfa9b | ||
|
|
6f6740ecee | ||
|
|
c1e6e16e49 | ||
|
|
3ca13fe6a5 | ||
|
|
4fb262c477 | ||
|
|
77fbebf893 | ||
|
|
9ccf39b49a | ||
|
|
e38c759563 | ||
|
|
c612166c73 | ||
|
|
08fb044086 | ||
|
|
adcc64c1b1 | ||
|
|
9d67d9d4bd | ||
|
|
1c386b2bd2 | ||
|
|
70f911fa3e | ||
|
|
17cd51259e | ||
|
|
c21739c9e4 | ||
|
|
07ef6c84d1 | ||
|
|
922483bb45 | ||
|
|
c99f92f782 | ||
|
|
b848423346 | ||
|
|
4a865430b0 | ||
|
|
bb94e3b228 | ||
|
|
b446a8a92e | ||
|
|
bd0c4061bd | ||
|
|
147e0fbf5b | ||
|
|
39978b475d | ||
|
|
5e7c4bc702 | ||
|
|
7167a5e44d | ||
|
|
460aeb32e2 | ||
|
|
0d9c23f4ce | ||
|
|
0ff9edd605 | ||
|
|
f5e2de6795 | ||
|
|
c84009e9f9 | ||
|
|
cfcda58ba7 | ||
|
|
c4d1f3d354 | ||
|
|
38e62f7ce5 | ||
|
|
fba3ee23ea | ||
|
|
a6fa079e64 | ||
|
|
cb88641d5a | ||
|
|
badc90bae1 | ||
|
|
2458b981f8 | ||
|
|
fba35861b3 | ||
|
|
186ab3945f | ||
|
|
ec1c398243 | ||
|
|
17cb82c393 | ||
|
|
d1e6264059 | ||
|
|
4478b7cd71 | ||
|
|
9fcc055dc5 | ||
|
|
bb44fa84b2 | ||
|
|
4878540fb0 | ||
|
|
99af96f74d | ||
|
|
1f7b493e6c | ||
|
|
b69554b493 | ||
|
|
7bddeb1b57 | ||
|
|
b71dac0128 | ||
|
|
d5bf3bbb59 | ||
|
|
983f70dc0d | ||
|
|
6c4e1d431b | ||
|
|
afe6806da2 | ||
|
|
b47fec5f33 | ||
|
|
e9873f83ec | ||
|
|
c4cddbe60a | ||
|
|
744f576ba7 | ||
|
|
f821060197 | ||
|
|
bff5109144 | ||
|
|
90c99e4509 | ||
|
|
3202c36846 | ||
|
|
aeedcaa750 | ||
|
|
594bf7af05 | ||
|
|
a2f9578859 | ||
|
|
74e3bc7c2e | ||
|
|
c335250f35 | ||
|
|
1d05a8a224 | ||
|
|
8cff959878 | ||
|
|
cecfaaf440 | ||
|
|
9cf8c84b07 | ||
|
|
43dd0fe5be | ||
|
|
9dfea8dde0 | ||
|
|
9d8028e044 | ||
|
|
3797df0b1d | ||
|
|
12e1863a54 | ||
|
|
23c0a948d2 | ||
|
|
ad054cadb5 | ||
|
|
6d2756dc49 | ||
|
|
a3579a9ecf | ||
|
|
71fa08b13a | ||
|
|
3d6229c697 | ||
|
|
b20448b19c | ||
|
|
29b2c91626 | ||
|
|
ae1403edb9 | ||
|
|
0edec4d945 | ||
|
|
57e8236ef7 | ||
|
|
3b337ac908 | ||
|
|
ea746da96c | ||
|
|
0f516c68eb | ||
|
|
c1e7ec54f6 | ||
|
|
46a3dbe84b | ||
|
|
876e1c51fb | ||
|
|
c9dd553941 | ||
|
|
a49b06f2f4 | ||
|
|
6a06117f75 | ||
|
|
9e84ed336c | ||
|
|
d7dac92d5f | ||
|
|
8ca39923dd | ||
|
|
328e82f630 | ||
|
|
cea75d6aa2 | ||
|
|
db3cd3589b | ||
|
|
506e733049 | ||
|
|
d7ca5e9549 | ||
|
|
d70fd3bfcc | ||
|
|
528f17eb6a | ||
|
|
c444e29cbb | ||
|
|
4ad586e427 | ||
|
|
403c80d7ca | ||
|
|
50de0a6fa4 | ||
|
|
f5d8aa0249 | ||
|
|
974dfcfeac | ||
|
|
65e4d57e88 | ||
|
|
9a3a402be0 | ||
|
|
3038fd8c7d | ||
|
|
e4d4c93d9c | ||
|
|
0a51fb06ea | ||
|
|
9849adcbd1 | ||
|
|
48b3c3ba61 | ||
|
|
971fd5aaed | ||
|
|
ef33e11a62 | ||
|
|
ba36c4b046 | ||
|
|
f9bb89481b | ||
|
|
50d5ec48cf | ||
|
|
820667c608 | ||
|
|
9d156723c0 | ||
|
|
2f791fe909 | ||
|
|
fa11401eb1 | ||
|
|
b06e077f8d | ||
|
|
fee76ca44f | ||
|
|
b2725d5149 | ||
|
|
ec8ecf5a80 | ||
|
|
0a4bde1ade | ||
|
|
b55eced0ed | ||
|
|
23ae9c302f | ||
|
|
3b754bfa09 | ||
|
|
a497513d89 | ||
|
|
380c21ea97 | ||
|
|
e8ff6f7526 | ||
|
|
bb332fa6d7 | ||
|
|
4fd9203800 | ||
|
|
9b8361171f | ||
|
|
11a7b68c4f | ||
|
|
9098de22c1 | ||
|
|
139b2878d0 | ||
|
|
53368fcbbf | ||
|
|
4ef92089d5 | ||
|
|
43735086d1 | ||
|
|
63e36ed43f | ||
|
|
f747269151 | ||
|
|
878bbedb37 | ||
|
|
4b1a47e902 | ||
|
|
121558bf5c | ||
|
|
681089f8c7 | ||
|
|
d417a712d3 | ||
|
|
6593a5f6fe | ||
|
|
e33d120481 | ||
|
|
39ff7cfd5c | ||
|
|
bded03908f | ||
|
|
b9dc9e72bb | ||
|
|
0e3c0b922d | ||
|
|
139d29cc9b | ||
|
|
659717cb1f | ||
|
|
68db304a2a | ||
|
|
e473958377 | ||
|
|
68b763bcdd | ||
|
|
239ca81db7 | ||
|
|
4adcc5e14a | ||
|
|
4cb26d462e | ||
|
|
9408a50b1b | ||
|
|
b2364d2398 | ||
|
|
34ee78dbbc | ||
|
|
56b94542a6 | ||
|
|
c09e8f6d12 | ||
|
|
5b5aeaa683 | ||
|
|
c60bd82da7 | ||
|
|
9d8ce5e4ee | ||
|
|
458e9f64a7 | ||
|
|
3809421de7 | ||
|
|
5b1121c9dd | ||
|
|
5dcfe44ccd | ||
|
|
cc290c0bdb | ||
|
|
9c6190c1ff | ||
|
|
7bd7c0cfc9 | ||
|
|
b18414ba8c | ||
|
|
6430166ec9 | ||
|
|
c7da7f2073 | ||
|
|
bd6e7dbbb1 | ||
|
|
d86bc80f43 | ||
|
|
485a127cf6 | ||
|
|
c92b03d908 | ||
|
|
dad6230cf1 | ||
|
|
33890cf0fd | ||
|
|
0d4a9e06d6 | ||
|
|
9af874d21b | ||
|
|
55d85df9fc | ||
|
|
d91fc890cd | ||
|
|
918c52eed8 | ||
|
|
7594ec632b | ||
|
|
565d08ed72 | ||
|
|
1305b5cf17 | ||
|
|
041c433ccb | ||
|
|
ff7a9547c3 | ||
|
|
602cd6991e | ||
|
|
686adcdebd | ||
|
|
588d5bd52b | ||
|
|
d82406a959 | ||
|
|
4765eaa7f3 | ||
|
|
96eda85806 | ||
|
|
88035ccbae | ||
|
|
87e738dda2 | ||
|
|
903f962f29 | ||
|
|
a4e0a34357 | ||
|
|
3c466df80e | ||
|
|
edd4966cea | ||
|
|
72393d06c9 | ||
|
|
df07d10a5c | ||
|
|
bb1737928e | ||
|
|
7895e42687 | ||
|
|
71d0f6fa31 | ||
|
|
4ea310fa68 | ||
|
|
3b42f42491 | ||
|
|
1322416ba4 | ||
|
|
947ccaad04 | ||
|
|
f862a0df24 | ||
|
|
868fd502b9 | ||
|
|
a8ef802c78 | ||
|
|
2241fd2c3b | ||
|
|
7303b94afc | ||
|
|
b948264c32 | ||
|
|
ff0e3df948 | ||
|
|
d110949d2a | ||
|
|
879ca01042 | ||
|
|
2702145f3f | ||
|
|
2f619f214b | ||
|
|
b235e5601f | ||
|
|
76a2e51c15 | ||
|
|
c530bba261 | ||
|
|
c99b3778b2 | ||
|
|
efde5747c4 | ||
|
|
ebd94934a5 | ||
|
|
e1cf3bf54b | ||
|
|
cb52d8466a | ||
|
|
24735b6ab3 | ||
|
|
ebf541219c | ||
|
|
d2b1d56e8b | ||
|
|
67fd229f20 | ||
|
|
55a095d536 | ||
|
|
ae65e4be8d | ||
|
|
2d303f5dc2 | ||
|
|
e83762d3b1 | ||
|
|
442eaf766c | ||
|
|
3e5b61e0c8 | ||
|
|
5570a24781 | ||
|
|
e472c82876 | ||
|
|
a857cfcc1e | ||
|
|
ef763a8550 | ||
|
|
a846f9da53 | ||
|
|
cff34358d7 | ||
|
|
8a2bdcd133 | ||
|
|
4e6188919f | ||
|
|
d7369707ba | ||
|
|
88636d269d | ||
|
|
4a0445b663 | ||
|
|
10123daad2 | ||
|
|
c5b08c225c | ||
|
|
6f123c6382 | ||
|
|
27e6dfeaab | ||
|
|
3d643b16b2 | ||
|
|
d614bba3ac | ||
|
|
66c1662537 | ||
|
|
fe9cd01b82 | ||
|
|
0c2e3777b1 | ||
|
|
348c7dbc56 | ||
|
|
3497040b78 | ||
|
|
cf5b90b444 | ||
|
|
eb739c9ff9 | ||
|
|
b971b362c2 | ||
|
|
ece85e6d15 | ||
|
|
4d81e23542 | ||
|
|
aa8b58628e | ||
|
|
9de0eeaf51 | ||
|
|
8270254823 | ||
|
|
e3ba535a79 | ||
|
|
d204427f73 | ||
|
|
88f5bb0931 | ||
|
|
fe9fd95b21 | ||
|
|
4016202806 | ||
|
|
215b3d3d59 | ||
|
|
9bb60794da | ||
|
|
32e3d245f9 | ||
|
|
bb6a2513eb | ||
|
|
30ecc0cc05 | ||
|
|
f8c62de6c0 | ||
|
|
833611ba2f | ||
|
|
ce5f83ac6c | ||
|
|
4d62f9f7f9 | ||
|
|
c36cc240e2 | ||
|
|
91b3772e7d | ||
|
|
47af54fb3e | ||
|
|
9c7fdfd9d1 | ||
|
|
fa334e0750 | ||
|
|
55a147143b | ||
|
|
de7f93d98b | ||
|
|
7822d89d65 | ||
|
|
b417e2bde7 | ||
|
|
2b60d3a78c | ||
|
|
4711cd6620 | ||
|
|
37deccd8d3 | ||
|
|
ddd1921deb | ||
|
|
c084a94138 | ||
|
|
e17f911334 | ||
|
|
6d1005d199 | ||
|
|
e3a26b77a4 | ||
|
|
0db03c6faf | ||
|
|
ec65bf7676 | ||
|
|
f7dd2f0323 | ||
|
|
f41ef551d3 | ||
|
|
413f1aac7c | ||
|
|
ca657150ec | ||
|
|
d0c167347d | ||
|
|
270b3fbe61 | ||
|
|
19405cabd6 | ||
|
|
55154564df | ||
|
|
f255fea57e | ||
|
|
cf3789564e | ||
|
|
aa240f1f7b | ||
|
|
83a09c4bc1 | ||
|
|
5f4ddbb8f4 | ||
|
|
2925358856 | ||
|
|
ed3b843dd2 | ||
|
|
8118a29493 | ||
|
|
3833ee6dfe | ||
|
|
96d76545bd | ||
|
|
84cf6b09c2 | ||
|
|
d665c61645 | ||
|
|
d18850ebab | ||
|
|
a7c2c9d9df | ||
|
|
6499933eab | ||
|
|
848a73723e | ||
|
|
6c8e7d253d | ||
|
|
c79ba3ab8a | ||
|
|
87810829ce | ||
|
|
44818a854b | ||
|
|
a5e34cce52 | ||
|
|
8e02aa8294 | ||
|
|
705d280f8b | ||
|
|
ce2d166de2 | ||
|
|
af76f11f36 | ||
|
|
fd23d27239 | ||
|
|
f5ab197b4f | ||
|
|
427803d644 | ||
|
|
21cdc5579e | ||
|
|
1b315b5eb5 | ||
|
|
b82c043d65 | ||
|
|
8116d69c3c | ||
|
|
b95c562651 | ||
|
|
ac1620c072 | ||
|
|
3f60848122 | ||
|
|
784cd4bab3 | ||
|
|
f4b643d54b | ||
|
|
dbe82c077a | ||
|
|
95c9a373bf | ||
|
|
7261fa3398 | ||
|
|
bfdb36d674 | ||
|
|
e779ddaaea | ||
|
|
2810316f4e | ||
|
|
33f1fad711 | ||
|
|
8286c3ab85 | ||
|
|
bf341dd20f | ||
|
|
5958efe958 | ||
|
|
6d49d7b8f9 | ||
|
|
af45b45afe | ||
|
|
00d2359308 | ||
|
|
645baf61de | ||
|
|
7460ffac73 | ||
|
|
4977dd0948 | ||
|
|
ce971cc665 | ||
|
|
03c5098730 | ||
|
|
6d24cbfb3c | ||
|
|
77d3191170 | ||
|
|
f654cbeac4 | ||
|
|
4da65aef3f | ||
|
|
e0dfbf3533 | ||
|
|
9ebd652a32 | ||
|
|
dbc3d97513 | ||
|
|
9d018a3f3b | ||
|
|
fad74c8c98 | ||
|
|
d99db3ad23 | ||
|
|
723c0c29fb | ||
|
|
3166285150 | ||
|
|
e41586ecd3 | ||
|
|
d095cc1684 | ||
|
|
58a36902f6 | ||
|
|
37c32b80ef | ||
|
|
64edc9110e | ||
|
|
c950a68bfe | ||
|
|
99da13bd8e | ||
|
|
742b89f756 | ||
|
|
fa2b5c4ae5 | ||
|
|
f6bb5ab28a | ||
|
|
04f8e23e0f | ||
|
|
0cb052fbff | ||
|
|
7f68fd56fb | ||
|
|
29557a18e8 | ||
|
|
7734a9ffff | ||
|
|
7f9ad263ec | ||
|
|
332c27c7d0 | ||
|
|
0f790a1604 | ||
|
|
40dff6d0cf | ||
|
|
d359fed17a | ||
|
|
2659776bd5 | ||
|
|
aff99f2f7c | ||
|
|
223995b551 | ||
|
|
ecc19ad5cd | ||
|
|
5031f236c8 | ||
|
|
1d39714b0f | ||
|
|
0ddd875c84 | ||
|
|
8358f4f72d | ||
|
|
566675f0b6 | ||
|
|
0fa9cefb7d | ||
|
|
042e3e2563 | ||
|
|
283589ec8e | ||
|
|
bc7de9b734 | ||
|
|
def47c9c96 | ||
|
|
f92986123c | ||
|
|
2573b20966 | ||
|
|
193e6496bd | ||
|
|
3a39b13acf | ||
|
|
e4cd9b85e7 | ||
|
|
05f0e69e98 | ||
|
|
a84611c9ae | ||
|
|
aaf443fca7 | ||
|
|
3652a69255 | ||
|
|
32c35596ea | ||
|
|
c0fddfe4e6 | ||
|
|
15e41c9c6d | ||
|
|
b8116dd3dd | ||
|
|
a4a5953786 | ||
|
|
08eb44ec1a | ||
|
|
73d477924e | ||
|
|
2c3e35d8bb | ||
|
|
fac83c023d | ||
|
|
f3b8665278 | ||
|
|
1089754436 | ||
|
|
f8deac1cea | ||
|
|
11308959fa | ||
|
|
b67083da0c | ||
|
|
f2c16696a5 | ||
|
|
3f3fbb6f60 | ||
|
|
234ef975f3 | ||
|
|
2e7bfa4ebc | ||
|
|
ea484a8978 | ||
|
|
c78e3213d6 | ||
|
|
8439fcf21d | ||
|
|
e9c44cbc0b | ||
|
|
5316d2ab43 | ||
|
|
cf9fc98047 | ||
|
|
ad494e5a71 | ||
|
|
1d0ce6fca8 | ||
|
|
9302caed59 | ||
|
|
548c69cad7 | ||
|
|
0b7f40afd1 | ||
|
|
dbae0f7cb6 | ||
|
|
1d87140b11 | ||
|
|
19bcc67668 | ||
|
|
1fc81ef683 | ||
|
|
2974bbbee3 | ||
|
|
a4ce71247f | ||
|
|
7280ca80ce | ||
|
|
5740867be5 | ||
|
|
6e0a3c8300 |
7338 changed files with 12842 additions and 291455 deletions
2
.cargo/config.toml
Normal file
2
.cargo/config.toml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[alias]
|
||||
xtask = "run --manifest-path xtask/Cargo.toml --"
|
||||
7
.dockerignore
Normal file
7
.dockerignore
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
.editorconfig
|
||||
.gitignore
|
||||
/.git/
|
||||
/.github/
|
||||
/.pre-commit-hooks.yaml
|
||||
/scripts/
|
||||
/target/
|
||||
11
.editorconfig
Normal file
11
.editorconfig
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.rs]
|
||||
indent_size = 4
|
||||
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# Enforce Unix newlines
|
||||
* text=auto eol=lf
|
||||
24
.github/dependabot.yml
vendored
Normal file
24
.github/dependabot.yml
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "cargo"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
open-pull-requests-limit: 5
|
||||
commit-message:
|
||||
prefix: "chore"
|
||||
include: "scope"
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "rust"
|
||||
groups:
|
||||
rust-dependencies:
|
||||
patterns:
|
||||
- "*"
|
||||
update-types:
|
||||
- "minor"
|
||||
- "patch"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
138
.github/workflows/deploy.yml
vendored
Normal file
138
.github/workflows/deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
name: deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*.*.*
|
||||
|
||||
concurrency:
|
||||
# If we ever end up with two concurrent jobs for releasing the same tag, the former should be cancelled
|
||||
group: release-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
actions: read
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy release
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
|
||||
# Prevent job from running on forks
|
||||
if: ${{ !github.event.repository.fork }}
|
||||
|
||||
strategy:
|
||||
# Execute one job at a time to avoid potential race conditions in the
|
||||
# GitHub release management APIs. See:
|
||||
# https://github.com/softprops/action-gh-release/issues/445#issuecomment-2407940052
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
target:
|
||||
- x86_64-unknown-linux-gnu
|
||||
- x86_64-unknown-linux-musl
|
||||
- aarch64-unknown-linux-gnu
|
||||
- aarch64-unknown-linux-musl
|
||||
- x86_64-pc-windows-msvc
|
||||
- i686-pc-windows-msvc
|
||||
- x86_64-apple-darwin
|
||||
- aarch64-apple-darwin
|
||||
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: nightly
|
||||
cache-bin: false
|
||||
cache-shared-key: cache
|
||||
|
||||
- name: Install cargo-deb
|
||||
if: endsWith(matrix.target, '-linux-gnu')
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-deb
|
||||
|
||||
- name: Get the Oxipng version
|
||||
id: oxipngMeta
|
||||
run: >
|
||||
echo "version=$(cargo metadata --format-version 1 --no-deps |
|
||||
jq -r '.packages[] | select(.name == "oxipng").version')" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Retrieve ${{ matrix.target }} binary
|
||||
uses: dawidd6/action-download-artifact@v21
|
||||
with:
|
||||
workflow: oxipng.yml
|
||||
commit: ${{ github.sha }}
|
||||
name: Oxipng binary (${{ matrix.target }})
|
||||
path: target
|
||||
|
||||
- name: Generate up to date manual
|
||||
run: scripts/manual.sh
|
||||
|
||||
- name: Build archives
|
||||
working-directory: target
|
||||
run: |
|
||||
ARCHIVE_NAME="oxipng-${{ steps.oxipngMeta.outputs.version }}-${{ matrix.target }}"
|
||||
|
||||
mkdir "$ARCHIVE_NAME"
|
||||
cp ../CHANGELOG.md ../README.md ../MANUAL.txt "$ARCHIVE_NAME"
|
||||
|
||||
case '${{ matrix.target }}' in
|
||||
*-windows-*)
|
||||
cp ../LICENSE "$ARCHIVE_NAME/LICENSE.txt"
|
||||
cp oxipng.exe "$ARCHIVE_NAME"
|
||||
zip "${ARCHIVE_NAME}.zip" "$ARCHIVE_NAME"/*;;
|
||||
*)
|
||||
cp ../LICENSE "$ARCHIVE_NAME"
|
||||
cp oxipng "$ARCHIVE_NAME"
|
||||
# Execute permissions are not stored in artifact files,
|
||||
# so make the binary world-executable to meet user
|
||||
# expectations set by preceding releases.
|
||||
# Related issue:
|
||||
# https://github.com/oxipng/oxipng/issues/575
|
||||
chmod ugo+x "$ARCHIVE_NAME"/oxipng
|
||||
tar -vczf "${ARCHIVE_NAME}.tar.gz" "$ARCHIVE_NAME"/*;;
|
||||
esac
|
||||
|
||||
- name: Install AArch64 libc components
|
||||
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
||||
run: |
|
||||
sudo apt-get -yq update
|
||||
# The shared libc AArch64 libraries are needed for cargo deb below
|
||||
# to be able to infer package requirements with dpkg-shlibdeps
|
||||
# properly
|
||||
sudo apt-get -yq install libc6-arm64-cross libgcc-s1-arm64-cross
|
||||
|
||||
- name: Build Debian packages
|
||||
if: endsWith(matrix.target, '-linux-gnu')
|
||||
env:
|
||||
# The *-arm64-cross packages above install AArch64 libraries in
|
||||
# /usr/<arch>/lib instead of /usr/lib/<arch>, as expected by
|
||||
# cargo-deb and dpkg-shlibdeps to find such shared libraries.
|
||||
# Make both of them visible to such commands by adding that directory
|
||||
# to the dynamic linker's library search path. See:
|
||||
# - <https://man7.org/linux/man-pages/man1/dpkg-shlibdeps.1.html> ("Errors" section)
|
||||
# - <https://github.com/kornelski/cargo-deb/issues/21>
|
||||
LD_LIBRARY_PATH: /usr/aarch64-linux-gnu/lib
|
||||
run: |
|
||||
mkdir -p "target/${{ matrix.target }}/release"
|
||||
mv target/oxipng "target/${{ matrix.target }}/release"
|
||||
cargo deb --target "${{ matrix.target }}" --no-build --no-strip
|
||||
|
||||
- name: Create release notes
|
||||
run: tail -n +3 CHANGELOG.md | sed -e '/^$/,$d' > RELEASE_NOTES.txt
|
||||
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v3
|
||||
with:
|
||||
name: v${{ steps.oxipngMeta.outputs.version }}
|
||||
body_path: RELEASE_NOTES.txt
|
||||
files: |
|
||||
target/*.zip
|
||||
target/*.tar.gz
|
||||
target/${{ matrix.target }}/debian/*.deb
|
||||
60
.github/workflows/docker.yml
vendored
Normal file
60
.github/workflows/docker.yml
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
name: docker
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- v*.*.*
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
use_cache:
|
||||
description: "Use build cache"
|
||||
required: true
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
concurrency:
|
||||
# If we ever end up with two concurrent Docker build jobs for the same commit
|
||||
# and same versioning context, the former should be cancelled
|
||||
group: docker-${{ github.sha }}-${{ github.ref_type }}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: docker/github-builder/.github/workflows/build.yml@v1
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
attestations: write
|
||||
with:
|
||||
output: image
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
cache: ${{ github.event_name != 'workflow_dispatch' || inputs.use_cache }}
|
||||
# We don't sign the image because ghcr.io doesn't support OCI Referrers API yet, and the fallback relies on pushing new tags on each build
|
||||
# https://github.com/docker/github-builder/issues/109#issuecomment-3885082486
|
||||
# https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#backwards-compatibility
|
||||
sign: false
|
||||
sbom: true
|
||||
meta-images: ghcr.io/${{ github.repository }}
|
||||
meta-tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{raw}}
|
||||
set-meta-annotations: true
|
||||
set-meta-labels: true
|
||||
labels: |
|
||||
org.opencontainers.image.title=Oxipng
|
||||
annotations: |
|
||||
org.opencontainers.image.title=Oxipng
|
||||
|
||||
secrets:
|
||||
registry-auths: |
|
||||
- registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
180
.github/workflows/oxipng.yml
vendored
Normal file
180
.github/workflows/oxipng.yml
vendored
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
name: oxipng
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
# If we ever end up with two concurrent CI jobs for the same commit, the former should be cancelled
|
||||
group: ci-${{ github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: CI
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 60
|
||||
|
||||
# Prevent tags and in-repo PRs from triggering this workflow more than once for a commit
|
||||
if: github.ref_type != 'tag' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork)
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target:
|
||||
- x86_64-unknown-linux-gnu
|
||||
- x86_64-unknown-linux-musl
|
||||
- aarch64-unknown-linux-gnu
|
||||
- aarch64-unknown-linux-musl
|
||||
- x86_64-pc-windows-msvc
|
||||
- i686-pc-windows-msvc
|
||||
- x86_64-apple-darwin
|
||||
- aarch64-apple-darwin
|
||||
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-24.04
|
||||
target-apt-arch: amd64
|
||||
- target: x86_64-unknown-linux-musl
|
||||
os: ubuntu-24.04
|
||||
target-apt-arch: amd64
|
||||
- target: aarch64-unknown-linux-gnu
|
||||
os: ubuntu-24.04-arm
|
||||
target-apt-arch: arm64
|
||||
- target: aarch64-unknown-linux-musl
|
||||
os: ubuntu-24.04-arm
|
||||
target-apt-arch: arm64
|
||||
- target: x86_64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
- target: i686-pc-windows-msvc
|
||||
os: windows-latest
|
||||
- target: x86_64-apple-darwin
|
||||
os: macos-15
|
||||
- target: aarch64-apple-darwin
|
||||
os: macos-15
|
||||
|
||||
env:
|
||||
CARGO_BUILD_TARGET: ${{ matrix.target }}
|
||||
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install musl development files
|
||||
if: endsWith(matrix.target, '-musl')
|
||||
run: |
|
||||
sudo apt-get -yq update
|
||||
sudo apt-get -yq install musl-tools musl-dev:${{ matrix.target-apt-arch }}
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: nightly
|
||||
target: ${{ env.CARGO_BUILD_TARGET }}
|
||||
components: clippy, rustfmt, rust-src
|
||||
cache-bin: false
|
||||
cache-shared-key: cache
|
||||
|
||||
- name: Install nextest
|
||||
uses: taiki-e/install-action@nextest
|
||||
|
||||
- name: Install cargo-hack
|
||||
if: matrix.target == 'x86_64-unknown-linux-gnu'
|
||||
uses: taiki-e/install-action@cargo-hack
|
||||
|
||||
- name: Install clippy-sarif
|
||||
if: matrix.target == 'x86_64-unknown-linux-gnu'
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: clippy-sarif
|
||||
|
||||
- name: Install sarif-fmt
|
||||
if: matrix.target == 'x86_64-unknown-linux-gnu'
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: sarif-fmt
|
||||
|
||||
- name: Run rustfmt
|
||||
if: matrix.target == 'x86_64-unknown-linux-gnu'
|
||||
run: cargo fmt --check
|
||||
|
||||
- name: Run Clippy for all feature combinations
|
||||
if: matrix.target == 'x86_64-unknown-linux-gnu'
|
||||
run: >
|
||||
set -o pipefail;
|
||||
cargo hack clippy --no-deps --all-targets --feature-powerset \
|
||||
--exclude-features sanity-checks,system-libdeflate \
|
||||
--message-format=json -- -D warnings \
|
||||
| clippy-sarif
|
||||
| tee clippy-results.sarif
|
||||
| sarif-fmt
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cargo nextest run --release --features sanity-checks
|
||||
cargo test --doc --release --features sanity-checks
|
||||
|
||||
- name: Build benchmarks
|
||||
run: cargo bench --no-run
|
||||
|
||||
- name: Build docs
|
||||
if: matrix.target == 'x86_64-unknown-linux-gnu'
|
||||
run: cargo doc --release --no-deps
|
||||
|
||||
- name: Build CLI binary
|
||||
run: cargo build --release -Zbuild-std
|
||||
env:
|
||||
RUSTFLAGS: "-Zlocation-detail=none -Zunstable-options -Cpanic=immediate-abort"
|
||||
|
||||
- name: Upload CLI binary as artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Oxipng binary (${{ matrix.target }})
|
||||
path: |
|
||||
target/${{ env.CARGO_BUILD_TARGET }}/release/oxipng
|
||||
target/${{ env.CARGO_BUILD_TARGET }}/release/oxipng.exe
|
||||
|
||||
- name: Upload analysis results to GitHub
|
||||
uses: github/codeql-action/upload-sarif@v4
|
||||
if: always() && matrix.target == 'x86_64-unknown-linux-gnu'
|
||||
continue-on-error: true
|
||||
with:
|
||||
sarif_file: clippy-results.sarif
|
||||
category: clippy
|
||||
|
||||
msrv-check:
|
||||
name: MSRV check
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
|
||||
# Prevent tags and in-repo PRs from triggering this workflow more than once for a commit
|
||||
if: github.ref_type != 'tag' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork)
|
||||
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install MSRV Rust toolchain
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.85.1
|
||||
cache-bin: false
|
||||
cache-shared-key: cache
|
||||
|
||||
- name: Install nextest
|
||||
uses: taiki-e/install-action@nextest
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cargo nextest run --release --features sanity-checks
|
||||
cargo test --doc --release --features sanity-checks
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -1,5 +1,6 @@
|
|||
target
|
||||
Cargo.lock
|
||||
*.bk
|
||||
.DS_Store
|
||||
*.bk
|
||||
*.out.png
|
||||
/.idea/
|
||||
/node_modules/
|
||||
/target/
|
||||
|
|
|
|||
7
.pre-commit-hooks.yaml
Normal file
7
.pre-commit-hooks.yaml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
- id: oxipng
|
||||
name: oxipng
|
||||
description: 'Multithreaded PNG optimizer written in Rust.'
|
||||
entry: oxipng
|
||||
language: rust
|
||||
types: [png]
|
||||
require_serial: true
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
language: rust
|
||||
rust:
|
||||
- 1.6.0
|
||||
- stable
|
||||
- beta
|
||||
- nightly
|
||||
608
CHANGELOG.md
608
CHANGELOG.md
|
|
@ -1,29 +1,587 @@
|
|||
**Version 0.2.2**
|
||||
- Limit number of threads to 1.5x number of cores
|
||||
- Significantly improve memory usage, especially with high optimization levels. ([#32](https://github.com/shssoichiro/oxipng/issues/32))
|
||||
- Refactor output code ([#19](https://github.com/shssoichiro/oxipng/issues/19))
|
||||
## Version 10.1.1
|
||||
|
||||
**Version 0.2.1**
|
||||
- Add rustdoc for public methods and structs
|
||||
- Improve filter mode 5 heuristic ([#16](https://github.com/shssoichiro/oxipng/issues/16))
|
||||
- Add tests for edge-case images with subtitles ([#29](https://github.com/shssoichiro/oxipng/issues/29))
|
||||
- [Performance] Improve Bigrams performance, giving notably faster results at lower levels.
|
||||
- [Improvement] Change `--np` flag to also prevent conversion to indexed from other color types.
|
||||
- [Improvement] Improve support for recompressing ICC profiles with high compression ratios.
|
||||
- [Misc] Add warning when `--ziwi` exceeds `--zi`.
|
||||
- [Build] Further reduce size of binaries.
|
||||
|
||||
**Version 0.2.0**
|
||||
- Fix program version that is displayed when running `oxipng -V`
|
||||
- Ensure `--quiet` mode is actually quiet (@SethDusek [#20](https://github.com/shssoichiro/oxipng/pull/20))
|
||||
- Write status/debug information to stderr instead of stdout
|
||||
- Use heuristics to determine best combination for `-o1` ([#21](https://github.com/shssoichiro/oxipng/issues/21))
|
||||
- [SEMVER_MAJOR] Allow 'safe', 'all', or comma-separated list as options for `--strip`
|
||||
- [SEMVER_MINOR] Add `-s` alias for `--strip`
|
||||
## Version 10.1.0
|
||||
|
||||
**Version 0.1.1**
|
||||
- Fix `oxipng *` writing all input files to one output file ([#15](https://github.com/shssoichiro/oxipng/issues/15))
|
||||
- [Feature] Add `--json` option for machine-readable output.
|
||||
- [Improvement] New default output with file counter and summary. (Use an extra `-v` flag to get the same output as before.)
|
||||
- [Bugfix] Fix fast mode sometimes giving suboptimal results for small, indexed images.
|
||||
|
||||
**Version 0.1.0**
|
||||
- Initial beta release
|
||||
- Reduce color type and bit depth
|
||||
- Recompress with zlib
|
||||
- Multithreading
|
||||
- Strip headers option
|
||||
- Backup file before writing option
|
||||
- Write to stdout option
|
||||
## Version 10.0.0
|
||||
|
||||
- [Breaking] CLI: Change short zopfli flag from `-Z` to `-z`.
|
||||
- [Breaking] CLI: Change `--pretend`/`-P` to `--dry-run`/`-d`.
|
||||
- [Breaking] CLI: Change `--interlace` options from `1`/`0` to `on`/`off`.
|
||||
- [Breaking] API: Change `Options.interlace: Option<Interlacing>` to `Options.interlace: Option<bool>`.
|
||||
- [Breaking] API: Change `Options.filter: IndexSet<RowFilter>` to `Options.filters: IndexSet<FilterStrategy>`.
|
||||
- [Breaking] API: Change `Options.deflate: Deflaters` to `Options.deflater: Deflater`.
|
||||
- [Breaking] API: Change `Deflaters::Zopfli { .. }` to `Deflater::Zopfli(ZopfliOptions { .. })`.
|
||||
- [Breaking] API: Change `optimize()` to return `(usize, usize)`, with original and optimized sizes.
|
||||
- [Feature] Allow zopfli iterations higher than 255.
|
||||
- [Feature] Add `--ziwi` option for zopfli iterations without improvement.
|
||||
- [Feature] Add `--max-raw-size` option to skip images that are too large.
|
||||
- [Feature] Add `--brute-level` and `--brute-lines` options for advanced control of Brute filter.
|
||||
- [Improvement] Reduce memory usage for `fast` mode.
|
||||
- [Improvement] Slightly improve compression with Brute filter at levels 5 and 6.
|
||||
- [Misc] Change `--preserve` option to no longer preserve last access time.
|
||||
- [Misc] Make help output colored.
|
||||
|
||||
## Version 9.1.5
|
||||
|
||||
- [Feature] Add `--sequential` option to process files sequentially rather than in parallel.
|
||||
- [Performance] Update to latest Zopfli with greatly improved performance.
|
||||
- [Improvement] Reduce memory usage.
|
||||
- [Bugfix] Correct handling of grayscale conversion when ICC profile is present.
|
||||
|
||||
## Version 9.1.4
|
||||
|
||||
- [Improvement] Improve optimization of APNG files (reductions still not supported yet).
|
||||
- [Improvement] Improve reductions for small images and ensure consistent results for repeat runs.
|
||||
- [Build] Add feature `system-libdeflate` to use the system-installed version of libdeflate.
|
||||
- [Misc] Strip C2PA metadata by default.
|
||||
|
||||
## Version 9.1.3
|
||||
|
||||
- [Feature] Add `--zi` option to control the number of Zopfli iterations.
|
||||
- [Improvement] Allow setting compression level to 0.
|
||||
- [Performance] Improve filtering performance for some images.
|
||||
- [Build] Move man page generation to an xtask.
|
||||
|
||||
## Version 9.1.2
|
||||
|
||||
- [Bugfix] Fix `--nx` still applying deinterlacing by default.
|
||||
- [Bugfix] Fix wildcard matching being case-sensitive on Windows.
|
||||
- [Bugfix] Fix optimized APNGs not being compatible with some programs.
|
||||
- [Build] Fix feature `sanity-checks` not working without `parallel`.
|
||||
- [Misc] Resolve ambiguity between optional dependencies and crate features.
|
||||
|
||||
## Version 9.1.1
|
||||
|
||||
- [Build] Change man page generation path to resolve issue with cargo publish.
|
||||
|
||||
## Version 9.1.0
|
||||
|
||||
- [Improvement] Add `--keep display` equivalent to `--strip safe`.
|
||||
- [Improvement] Add modified zeng palette sorting method, improving optimization of indexed images.
|
||||
- [Improvement] If only one filter is specified, guarantee to only use this one.
|
||||
- [Improvement] Evaluate low-depth indexed even if low-depth grayscale was already achieved.
|
||||
- [Bugfix] Fix battiato palette sorting method not being used if the input was not already indexed.
|
||||
- [Bugfix] Fix rare crash caused by a truncated palette.
|
||||
- [Build] Reduce size of binaries.
|
||||
- [Build] Add man page generation.
|
||||
- [Build] Publish deb archives for Linux.
|
||||
- [Misc] Bump minimum Rust version to 1.74.0.
|
||||
|
||||
## Version 9.0.0
|
||||
|
||||
- [Breaking] Remove `--backup` option. Use `--out` or `--dir` to preserve existing files.
|
||||
- [Breaking] Remove `--check` option. Use `--nx --nz` to perform a non-optimizing run.
|
||||
- [Breaking] API: Replace `pretend` option with `OutFile::None`.
|
||||
- [Breaking] API: Move `preserve_attrs` into `OutFile::Path`.
|
||||
- [Breaking] Default to removing interlacing. Use `-i keep` to retain existing interlacing.
|
||||
- [Feature] Add Raw API for creating optimised PNGs from raw image data.
|
||||
- [Feature] Add basic support for APNG files.
|
||||
- [Feature] Add `--scale16` option to forcibly reduce 16-bit images to 8-bit.
|
||||
- [Improvement] Process multiple files in parallel.
|
||||
- [Improvement] Improve reductions, particularly for indexed or very small images.
|
||||
- [Improvement] Improve compression with latest version of libdeflate.
|
||||
- [Improvement] Recompress iCCP chunks.
|
||||
- [Improvement] Change recursive mode to only process .png/.apng files.
|
||||
- [Improvement] Add support for glob patterns in quotes on Windows.
|
||||
- [Improvement] Quieter default output logging, with multiple levels of verbosity.
|
||||
- [Bugfix] Fix deadlock when using oxipng within an existing Rayon thread pool.
|
||||
- [Bugfix] Fix early abort in recursive mode when a read error occurred.
|
||||
- [Bugfix] Fix losing aux chunks when there's more than one of the same type.
|
||||
- [Bugfix] Fix sometimes writing output even when it was larger.
|
||||
- [Misc] Revamp CI workflow to upload artifacts and generate binaries for additional architectures.
|
||||
- [Misc] Bump minimum Rust version to 1.66.0.
|
||||
|
||||
## Version 8.0.0
|
||||
|
||||
- [Breaking] Revamp alpha optimization
|
||||
- [Bugfix] Fix grayscale depth reduction with tRNS pixel
|
||||
- [Bugfix] Fix fast mode with zopfli
|
||||
- [Improvement] Tweaks to interlacing and format display
|
||||
- [Improvement] Ability to reduce alpha channel to tRNS pixel
|
||||
- [Improvement] Performance improvements to colorspace reduction
|
||||
- [Misc] Disable image validation in release mode, as it is deemed no longer necessary
|
||||
|
||||
## Version 7.0.0
|
||||
|
||||
- [Breaking] Switch to libdeflater as the default
|
||||
- [Breaking] Rebalance presets
|
||||
- [Breaking] Update safe headers to remove
|
||||
- [Breaking] Bump minimum Rust version to 1.61.0
|
||||
- [Feature] Introduce new filter strategies
|
||||
- [Feature] Allow setting libdeflate compression level
|
||||
- [Feature] Add optional dockerization
|
||||
- [Improvement] Improve alpha reductions
|
||||
- [Improvement] Fast deinterlace for 8-bit
|
||||
- [Improvement] Refactor heuristics for fast filter evaluation
|
||||
- [Improvement] Improve file size reduction further
|
||||
- [Bugfix] Avoid printing output bytes on decompress error
|
||||
- [Bugfix] Fix compression level 0
|
||||
- [Bugfix] Fix directional alpha reductions
|
||||
- [Bugfix] Fix edge cases in palette reduction
|
||||
|
||||
### Version 6.0.1
|
||||
|
||||
- [Bugfix] Fix an issue where Zopfli mode could generate corrupt images
|
||||
|
||||
### Version 6.0.0
|
||||
|
||||
- [Breaking] Bump minimum Rust version to 1.57.0
|
||||
- [Feature] Add `--check`/`-c` CLI option
|
||||
- [Security] Update stderrlog to 0.5.2 (Fixes RUSTSEC-2022-0006)
|
||||
- [Security] Remove chrono as a transitive dependency (Fixes RUSTSEC-2020-0159)
|
||||
- [Misc] Bump `clap` to 3.2
|
||||
- [Misc] Bump `zopfli` to 0.7
|
||||
- [Misc] Bump `libdeflater` to 0.10
|
||||
- [Misc] Remove `byteorder` dependency in favor of stdlib functions
|
||||
- [Misc] Bump `image` to 0.24
|
||||
- [Misc] Bump `crc` to 3.0
|
||||
- [Misc] Bump `miniz_oxide` to 0.6
|
||||
- [Misc] Update to Rust edition 2021
|
||||
- [Misc] Various internal improvements
|
||||
|
||||
### Version 5.0.1
|
||||
|
||||
- [Bugfix] Fix an issue where -o5 and -o6 were not testing all options
|
||||
- [Misc] Bump miniz_oxide to 0.5
|
||||
|
||||
### Version 5.0.0
|
||||
|
||||
- [Breaking] Bump minimum Rust version to 1.46.0
|
||||
- [Bugfix] Avoid many panics that may occur on broken files
|
||||
- [Bugfix] Fix race condition that may cause tests to fail
|
||||
- [Performance] Optimizations to unfiltering and copying
|
||||
- [Feature] Add `--ng` option to skip grayscale reduction
|
||||
- [Feature] Also preserve timestamps when using `--preserve`
|
||||
- [Misc] Bump `crc` to 2.x
|
||||
|
||||
### Version 4.0.3
|
||||
|
||||
- Bump itertools to 0.10.x
|
||||
- Temporarily disable i686 releases, which were failing due to an odd linker issue,
|
||||
so that at least amd64 builds will publish successfully
|
||||
- This only relates to the releases published on Github. You can still manually compile oxipng for any platform.
|
||||
|
||||
### Version 4.0.2
|
||||
|
||||
- Includes another update to libdeflater that improves support for targets
|
||||
without a C stdlib, like wasm32.
|
||||
|
||||
### Version 4.0.1
|
||||
|
||||
- Includes an update to libdeflater that improves support for targets
|
||||
without a C stdlib, like wasm32.
|
||||
|
||||
### Version 4.0.0
|
||||
|
||||
- [Breaking] Bump minimum Rust version to 1.45.0
|
||||
- [Feature] Make `libdeflater` and `zopfli` optional for API users
|
||||
- [Bugfix] Fix cloudflare-zlib on aarch64 CPUs
|
||||
- [Bugfix] Don't exit on finding a non-PNG file when crawling recursively
|
||||
- [Bugfix] Make `rayon` truly optional
|
||||
- Various internal improvements
|
||||
|
||||
### Version 3.0.1
|
||||
|
||||
- [Bugfix] Re-add `--force` flag to CLI
|
||||
- This was accidentally removed somehow
|
||||
- Many non-breaking dependency version bumps
|
||||
|
||||
### Version 3.0.0
|
||||
|
||||
- [Breaking] Bump minimum Rust version to 1.41.0
|
||||
- [Breaking] Use IndexMap/IndexSet to provide more consistent performance ([#202](https://github.com/oxipng/oxipng/pull/202))
|
||||
- This changes some public-facing types.
|
||||
`IndexMap` and `IndexSet` are reexported
|
||||
at the crate root to aid migration.
|
||||
- [Breaking] Remove fields from the `Options` struct which were never used ([#211](https://github.com/oxipng/oxipng/pull/211/files#diff-b4aea3e418ccdb71239b96952d9cddb6L217), [#212](https://github.com/oxipng/oxipng/pull/212/files#diff-b4aea3e418ccdb71239b96952d9cddb6L134))
|
||||
- [Breaking] Refactor zlib-specific options in the `Options` struct ([#210](https://github.com/oxipng/oxipng/pull/210/files))
|
||||
- [Feature] Add libdeflater as an option ([#203](https://github.com/oxipng/oxipng/pull/203))
|
||||
- [Feature] Use standard `log` library ([#218](https://github.com/oxipng/oxipng/pull/218))
|
||||
- [Feature] Add `-o max` setting which will always reference the highest compression preset ([#224](https://github.com/oxipng/oxipng/pull/224))
|
||||
- [Deprecated] `-o 4` was found to be equivalent to `-o 3` and is deprecated.
|
||||
It will likely be removed in a future release.
|
||||
For now it remains equivalent to `-o 3`. ([#224](https://github.com/oxipng/oxipng/pull/224))
|
||||
- [Bugfix] Ensure output is deterministic ([#199](https://github.com/oxipng/oxipng/pull/199))
|
||||
- Update `image` crate to 0.23
|
||||
- Update `itertools` crate to 0.9
|
||||
- Various performance and internal improvements
|
||||
|
||||
### Version 2.3.0
|
||||
|
||||
- Allow disabling all alpha optimizations ([#181](https://github.com/oxipng/oxipng/pull/181))
|
||||
- Fix interlacing issues on tiny images ([#182](https://github.com/oxipng/oxipng/pull/182))
|
||||
- Reduce memory usage in filtering ([#191](https://github.com/oxipng/oxipng/pull/191))
|
||||
- Implement palette sorting to improve compression ([#193](https://github.com/oxipng/oxipng/pull/193))
|
||||
- Disable alpha optimizations by default ([#187](https://github.com/oxipng/oxipng/pull/187))
|
||||
- Add support for WASM ([#194](https://github.com/oxipng/oxipng/pull/194))
|
||||
|
||||
### Version 2.2.2
|
||||
|
||||
- Fix grayscale bit-depth reduction ([#171](https://github.com/oxipng/oxipng/pull/171))
|
||||
- Fix typos and incorrect log message ([#172](https://github.com/oxipng/oxipng/pull/172))
|
||||
- Make metadata order deterministic ([#174](https://github.com/oxipng/oxipng/pull/174))
|
||||
- Fix 32-bit builds ([#176](https://github.com/oxipng/oxipng/pull/176))
|
||||
- Enable LTO in release builds ([#177](https://github.com/oxipng/oxipng/pull/177))
|
||||
- Use deterministic compression strategy ([#179](https://github.com/oxipng/oxipng/pull/179))
|
||||
- Fix decoding interlaced images with height or width <= 2 ([#175](https://github.com/oxipng/oxipng/pull/175))
|
||||
- Preallocate memory in reduced_alpha_to_up ([#180](https://github.com/oxipng/oxipng/pull/180))
|
||||
- Update `bit-vec` crate to 0.6
|
||||
|
||||
### Version 2.2.1
|
||||
|
||||
- Fix compression of very large files ([#167](https://github.com/oxipng/oxipng/pull/167)) ([#168](https://github.com/oxipng/oxipng/pull/168))
|
||||
|
||||
### Version 2.2.0
|
||||
|
||||
- Various internal improvements ([#154](https://github.com/oxipng/oxipng/pull/154)) ([#158](https://github.com/oxipng/oxipng/pull/158)) ([#160](https://github.com/oxipng/oxipng/pull/160)) ([#161](https://github.com/oxipng/oxipng/pull/161)) ([#162](https://github.com/oxipng/oxipng/pull/162)) ([#163](https://github.com/oxipng/oxipng/pull/163))
|
||||
- Update `image` crate to 0.21.0
|
||||
- Update `itertools` crate to 0.8.0
|
||||
- Update `zopfli` crate to 0.4.0
|
||||
- Use Rust edition 2018
|
||||
- Bump minimum required Rust version to 1.31.0
|
||||
|
||||
### Version 2.1.8
|
||||
|
||||
- Fix non-standard sBIT headers in other code locations ([#153](https://github.com/oxipng/oxipng/issues/153))
|
||||
|
||||
### Version 2.1.7
|
||||
|
||||
- 80x faster palette reduction ([#150](https://github.com/oxipng/oxipng/pull/150))
|
||||
- Optimize RGB to palette conversion ([#148](https://github.com/oxipng/oxipng/pull/148))
|
||||
- Various microoptimizations ([#146](https://github.com/oxipng/oxipng/pull/146))
|
||||
- Introduce third-party safe wrapper around cloudflare-zlib ([#149](https://github.com/oxipng/oxipng/pull/149))
|
||||
|
||||
### Version 2.1.6
|
||||
|
||||
- Identify and drop useless sRGB profiles ([#143](https://github.com/oxipng/oxipng/pull/143))
|
||||
- Alpha heuristic improvements ([#144](https://github.com/oxipng/oxipng/pull/144))
|
||||
- Bump `miniz_oxide` and `cloudflare-zlib-sys` to 0.2.0
|
||||
|
||||
### Version 2.1.5
|
||||
|
||||
- Fix issue where some images will incorrectly reduce bit depth ([#140](https://github.com/oxipng/oxipng/issues/140))
|
||||
|
||||
### Version 2.1.4
|
||||
|
||||
- Bump `image` crate to 0.20.0
|
||||
|
||||
### Version 2.1.3
|
||||
|
||||
- Fix i686 builds
|
||||
- Performance improvements
|
||||
|
||||
### Version 2.1.2
|
||||
|
||||
- Fix issue with PNG to Indexed reduction on images with transparency pixel ([#129](https://github.com/oxipng/oxipng/issues/129))
|
||||
|
||||
### Version 2.1.1
|
||||
|
||||
- More fixes for alpha optimization on interlaced images ([#133](https://github.com/oxipng/oxipng/issues/133))
|
||||
|
||||
### Version 2.1.0
|
||||
|
||||
- [SEMVER_MINOR] Bump minimum Rust version to 1.27.0
|
||||
- [SEMVER_MINOR] Reenable faster Cloudflare zlib compression on platforms that support it
|
||||
- Fix memory leak with Cloudflare zlib ([#126](https://github.com/oxipng/oxipng/issues/126))
|
||||
- Minor fixes and cleanup
|
||||
|
||||
### Version 2.0.2
|
||||
|
||||
- Fix an issue in alpha optimization on interlaced images ([#113](https://github.com/oxipng/oxipng/issues/113))
|
||||
|
||||
### Version 2.0.1
|
||||
|
||||
- Revert making Cloudflare zlib the default, as it introduced a major memory leak. It will be put back behind a feature flag, and reenabled when the issue is fixed.
|
||||
- Revert minimum Rust version to 1.24.0
|
||||
|
||||
### Version 2.0.0
|
||||
|
||||
- [SEMVER_MAJOR] Make PngError a proper Error enum
|
||||
- [SEMVER_MINOR] Bump minimum Rust version to 1.27.0
|
||||
- [SEMVER_MINOR] Make Rayon an optional dependency (enabled by default)
|
||||
- [SEMVER_MINOR] Option to limit wall clock time spent in optimization trials
|
||||
- [SEMVER_MINOR] `--keep` option (works similar to `--strip`, but takes a comma-separated list of headers to keep, and removes all other non-critical headers)
|
||||
- Use faster Cloudflare zlib compression on platforms that support it
|
||||
- Allow specifying more than 2 filter types via the CLI
|
||||
- Avoid double glob processing on unix
|
||||
- Fix reading from stdin
|
||||
- Cleanup help text
|
||||
- Various performance improvements
|
||||
|
||||
### Version 1.0.4
|
||||
|
||||
- Bump `image` to 0.19.0
|
||||
- Bump `bit-vec` to 0.5.0
|
||||
- Bump `regex` to 1.0.0
|
||||
|
||||
### Version 1.0.3
|
||||
|
||||
- Bump dependencies
|
||||
|
||||
### Version 1.0.2
|
||||
|
||||
- Fix a change that breaks Itertools::flatten with recent Rust nightlies
|
||||
|
||||
### Version 1.0.1
|
||||
|
||||
- Bump rayon to 1.0 ([#99](https://github.com/oxipng/oxipng/pull/99) @cuviper)
|
||||
- Bump minor versions of other dependencies for binary distribution
|
||||
|
||||
### Version 1.0.0
|
||||
|
||||
- Remove the C dependency on miniz, and replace it with a Rust version ([#57](https://github.com/oxipng/oxipng/issues/57))
|
||||
- This improves decompression speed by 15%. Compression speed is not affected.
|
||||
- [SEMVER_MAJOR] This also obsoletes the `-zm` command line option and the `memory` key on the `Options` struct.
|
||||
- Presets will be updated automatically. This means that presets 3 and higher will run significantly more quickly.
|
||||
- [SEMVER_MAJOR] Adjust the presets, now that `-zm` is no longer an option.
|
||||
- `-o3` now tests all filter types. This will result in 50% more trials than before, but may give up to 10% more compression gain.
|
||||
- `-o4` and higher now test all alpha optimization types. This adds 5 trials specific to the alpha channel. Only transparent images are affected.
|
||||
- Implement unix-specific permissions copying for `-p` option
|
||||
- Performance optimizations
|
||||
- Refactor of internal code
|
||||
|
||||
### Version 0.19.0
|
||||
|
||||
- [SEMVER_MAJOR] Default to overwriting the input file if `out_file` is not set.
|
||||
This does not affect the CLI, but with the library, it was easy to forget to set the `out_file`,
|
||||
and there was no warning that no output file would be written.
|
||||
- Bump dependencies, reduces binary size by a considerable amount
|
||||
- Hide all modules from documentation, and only export the specific structures that should be public.
|
||||
Previously there were too many implementation details made public. The modules are still public for the purposes of our integration tests,
|
||||
but we strongly advise against using undocumented modules. These may become private in the future.
|
||||
- Internal refactoring and code cleanup
|
||||
- Fix an error message that was displaying the wrong file path
|
||||
- Fix an issue where the output file would not be written if the input was already optimized,
|
||||
even if the output path was different from the input path
|
||||
|
||||
### Version 0.18.3
|
||||
|
||||
- Return exit code of 1 if an error occurred while processing a file using the CLI app ([#93](https://github.com/oxipng/oxipng/issues/93))
|
||||
|
||||
### Version 0.18.2
|
||||
|
||||
- Bump `image` to 0.18
|
||||
- Fix unfiltering of scan lines in interlaced images ([#92](https://github.com/oxipng/oxipng/issues/92))
|
||||
|
||||
### Version 0.18.1
|
||||
|
||||
- Bump `rayon` to 0.9
|
||||
- Fix failure to optimize on certain grayscale images ([#89](https://github.com/oxipng/oxipng/issues/89))
|
||||
|
||||
### Version 0.18.0
|
||||
|
||||
- Bump `itertools` to 0.7
|
||||
- Bump `image` to 0.17
|
||||
- [SEMVER_MAJOR] Bump minimum rustc version to 1.20.0
|
||||
- Fix parsing of glob paths on Windows ([#90](https://github.com/oxipng/oxipng/issues/90))
|
||||
|
||||
### Version 0.17.2
|
||||
|
||||
- Bump `image` to 0.16
|
||||
- Quickly pass over files that do not have a PNG header ([#85](https://github.com/oxipng/oxipng/issues/85) @emielbeinema)
|
||||
- Return an error instead of crashing on APNG files ([#83](https://github.com/oxipng/oxipng/issues/83) @emielbeinema)
|
||||
|
||||
### Version 0.17.1
|
||||
|
||||
- Remove VC++ download requirement for Windows users
|
||||
|
||||
### Version 0.17.0
|
||||
|
||||
- [SEMVER_MAJOR] Bump minimum required rustc version to 1.19.0
|
||||
- [SEMVER_MINOR] Oxipng will now, by default, attempt to change all transparent pixels to `rgba(0, 0, 0, 0)` to improve compression.
|
||||
It does fast trials with filters 0 and 5 to see if this is an improvement over
|
||||
the existing alpha channel.
|
||||
- [SEMVER_MINOR] Add a `-a` option to the command line (`alphas` in the struct) which enables 6 different
|
||||
trials for optimizing the alpha channel, using the previously mentioned fast heuristic.
|
||||
This option will make optimization of images with transparency somewhat slower,
|
||||
but may improve compression.
|
||||
- Fixed a bug in reducing palettes for images with bit depth of two ([#80](https://github.com/oxipng/oxipng/issues/80))
|
||||
- Fixed another bug in reducing palettes for images with bit depth less than eight ([#82](https://github.com/oxipng/oxipng/issues/82))
|
||||
- Code cleanup
|
||||
- Bump `image` to 0.15
|
||||
|
||||
### Version 0.16.3
|
||||
|
||||
- Fix command-line help text ([#70](https://github.com/oxipng/oxipng/issues/70))
|
||||
|
||||
### Version 0.16.2
|
||||
|
||||
- Publicly export `error` module
|
||||
|
||||
### Version 0.16.1
|
||||
|
||||
- Fix rayon's breaking changes that they made in a point release
|
||||
|
||||
### Version 0.16.0
|
||||
|
||||
- [SEMVER_MAJOR] Bump minimum rustc version to 1.17.0
|
||||
- Bump `image` to 0.14
|
||||
- Bump `rayon` to 0.8
|
||||
|
||||
### Version 0.15.2
|
||||
|
||||
- Bump `image` to 0.13 ([#65](https://github.com/oxipng/oxipng/pull/65))
|
||||
- Bump `rayon` to 0.7
|
||||
- Bump `itertools` to 0.6
|
||||
|
||||
### Version 0.15.1
|
||||
|
||||
- Ignore color reductions that would increase file size ([#61](https://github.com/oxipng/oxipng/issues/61))
|
||||
|
||||
### Version 0.15.0
|
||||
|
||||
- [SEMVER_MINOR] Check images for correctness before writing result ([#60](https://github.com/oxipng/oxipng/issues/60))
|
||||
- Fix invalid output when reducing image to a different color type but file size does not improve ([#60](https://github.com/oxipng/oxipng/issues/60))
|
||||
- Don't write new file if moving from interlaced to non-interlaced if new file would be larger
|
||||
|
||||
### Version 0.14.4
|
||||
|
||||
- Fix bug when reducing RGBA to Indexed if image has 256 colors plus a background color
|
||||
|
||||
### Version 0.14.3
|
||||
|
||||
- Fix multiple bugs when reducing transparency palettes
|
||||
|
||||
### Version 0.14.2
|
||||
|
||||
- Fix a bug when reducing palette in images with bit depth less than 8
|
||||
- Fix a bug when reducing palette in images with transparency
|
||||
|
||||
### Version 0.14.1
|
||||
|
||||
- Remove zlib dependency and switch entirely to miniz, since zlib 1.2.11 was not working with oxipng. This costs some performance, but is better than having a broken application.
|
||||
|
||||
### Version 0.14.0
|
||||
|
||||
- Performance optimizations
|
||||
- [SEMVER_MAJOR] Bump minimum rustc version to 1.13.0
|
||||
- Add categories on crates.io
|
||||
|
||||
### Version 0.13.1
|
||||
|
||||
- Bump regex dependency to 0.2
|
||||
- Bump byteorder dependency to 1.0
|
||||
- Bump rayon dependency to 0.6
|
||||
|
||||
### Version 0.13.0
|
||||
|
||||
- Fix bug in certain PNG headers when reducing color type ([#52](https://github.com/oxipng/oxipng/issues/52))
|
||||
- [SEMVER_MAJOR] Reduction functions now take `&mut PngData` and return a `bool` indicating whether the image was reduced
|
||||
- [SMEVER_MAJOR] Bump minimum required rustc version to 1.12.0
|
||||
|
||||
### Version 0.12.0
|
||||
|
||||
- Performance optimizations
|
||||
- Fix processing filenames that contain commas (@aliceatlas [#50](https://github.com/oxipng/oxipng/pull/50))
|
||||
- [SEMVER_MINOR] Add zopfli option (-Z), disabled by default. Gives about 10% better compression, but is currently 50-100x slower.
|
||||
|
||||
### Version 0.11.0
|
||||
|
||||
- [SEMVER_MAJOR] Bump minimum rustc version to 1.9.0, required by dependencies
|
||||
- [SEMVER_MINOR] Allow calling optimization presets via crate using `Options::from_preset`
|
||||
- [SEMVER_MAJOR] Return proper `PngError` type which implements `std::error::Error` from `Result`s
|
||||
- [SEMVER_MAJOR] Rename module `deflate::deflate` to `deflate`
|
||||
- Performance optimizations
|
||||
|
||||
### Version 0.10.0
|
||||
|
||||
- [SEMVER_MINOR] Make clap and regex dependencies optional
|
||||
- Enabled by default, needed for executable build; can be disabled for use in crates
|
||||
- Remove reduction from palette to grayscale, which was not working and provided minimal benefit
|
||||
|
||||
### Version 0.9.0
|
||||
|
||||
- [SEMVER_MAJOR] Significant refactoring of modules
|
||||
- Use `itertools` to cleanup areas of code
|
||||
- Use multiple threads for filtering trials
|
||||
|
||||
### Version 0.8.2
|
||||
|
||||
- Fix issue where images smaller than 4px width would crash on interlacing ([#42](https://github.com/oxipng/oxipng/issues/42))
|
||||
|
||||
### Version 0.8.1
|
||||
|
||||
- Minor optimizations
|
||||
- Fix issue where interlaced images with certain widths would fail to optimize
|
||||
|
||||
### Version 0.8.0
|
||||
|
||||
- [SEMVER_MINOR] Add support for optimizing PNGs already loaded into memory via library function
|
||||
|
||||
### Version 0.7.0
|
||||
|
||||
- Minor compression improvement on interlaced images
|
||||
- Performance optimizations
|
||||
- [SEMVER_MINOR] Move default Options into a Default impl
|
||||
- [SEMVER_MINOR] Add option for setting number of threads ([#39](https://github.com/oxipng/oxipng/issues/39))
|
||||
|
||||
### Version 0.6.0
|
||||
|
||||
- Fix issue where output directory would not be created if it did not exist
|
||||
- Use miniz for compression strategies where it outperforms zlib
|
||||
- [SEMVER_MINOR] Partially implement -p / --preserve, as far as stable Rust will allow for now
|
||||
- [SEMVER_MINOR] Implement --fix to ignore CRC errors and recalculate correct CRC in output
|
||||
|
||||
### Version 0.5.0
|
||||
|
||||
- [SEMVER_MINOR] Palette entries can now reduced, on by default ([#11](https://github.com/oxipng/oxipng/issues/11))
|
||||
- Don't report that we are in pretend mode if verbosity is set to none
|
||||
- Add cargo bench suite ([#7](https://github.com/oxipng/oxipng/issues/7))
|
||||
|
||||
### Version 0.4.0
|
||||
|
||||
- Performance optimizations
|
||||
- [SEMVER_MAJOR] `-s` automatically infers `--strip safe` ([#31](https://github.com/oxipng/oxipng/issues/31))
|
||||
- Update byteorder and clap crates
|
||||
- Fix issue where interlaced images incorrectly applied filters on the first line of a pass
|
||||
|
||||
### Version 0.3.0
|
||||
|
||||
- Properly decode interlaced images
|
||||
- [SEMVER_MINOR] Allow converting between progressive and interlaced images ([#3](https://github.com/oxipng/oxipng/issues/3))
|
||||
- Fix a bug that would cause oxipng to crash on very small images
|
||||
|
||||
### Version 0.2.2
|
||||
|
||||
- Limit number of threads to 1.5x number of cores
|
||||
- Significantly improve memory usage, especially with high optimization levels. ([#32](https://github.com/oxipng/oxipng/issues/32))
|
||||
- Refactor output code ([#19](https://github.com/oxipng/oxipng/issues/19))
|
||||
|
||||
### Version 0.2.1
|
||||
|
||||
- Add rustdoc for public methods and structs
|
||||
- Improve filter mode 5 heuristic ([#16](https://github.com/oxipng/oxipng/issues/16))
|
||||
- Add tests for edge-case images with subtitles ([#29](https://github.com/oxipng/oxipng/issues/29))
|
||||
|
||||
### Version 0.2.0
|
||||
|
||||
- Fix program version that is displayed when running `oxipng -V`
|
||||
- Ensure `--quiet` mode is actually quiet (@SethDusek [#20](https://github.com/oxipng/oxipng/pull/20))
|
||||
- Write status/debug information to stderr instead of stdout
|
||||
- Use heuristics to determine best combination for `-o1` ([#21](https://github.com/oxipng/oxipng/issues/21))
|
||||
- [SEMVER_MAJOR] Allow 'safe', 'all', or comma-separated list as options for `--strip`
|
||||
- [SEMVER_MINOR] Add `-s` alias for `--strip`
|
||||
|
||||
### Version 0.1.1
|
||||
|
||||
- Fix `oxipng *` writing all input files to one output file ([#15](https://github.com/oxipng/oxipng/issues/15))
|
||||
|
||||
### Version 0.1.0
|
||||
|
||||
- Initial beta release
|
||||
- Reduce color type and bit depth
|
||||
- Recompress with zlib
|
||||
- Multithreading
|
||||
- Strip headers option
|
||||
- Backup file before writing option
|
||||
- Write to stdout option
|
||||
|
|
|
|||
649
Cargo.lock
generated
Normal file
649
Cargo.lock
generated
Normal file
|
|
@ -0,0 +1,649 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "adler2"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
||||
|
||||
[[package]]
|
||||
name = "anstream"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"anstyle-parse",
|
||||
"anstyle-query",
|
||||
"anstyle-wincon",
|
||||
"colorchoice",
|
||||
"is_terminal_polyfill",
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle"
|
||||
version = "1.0.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-parse"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
|
||||
dependencies = [
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-query"
|
||||
version = "1.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
|
||||
dependencies = [
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-wincon"
|
||||
version = "3.0.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"once_cell_polyfill",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "2.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
|
||||
|
||||
[[package]]
|
||||
name = "bitvec"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c"
|
||||
dependencies = [
|
||||
"funty",
|
||||
"radium",
|
||||
"tap",
|
||||
"wyz",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.20.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
|
||||
|
||||
[[package]]
|
||||
name = "bytemuck"
|
||||
version = "1.25.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder-lite"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.60"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20"
|
||||
dependencies = [
|
||||
"find-msvc-tools",
|
||||
"shlex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
"clap_lex",
|
||||
"strsim",
|
||||
"terminal_size",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_lex"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
|
||||
|
||||
[[package]]
|
||||
name = "colorchoice"
|
||||
version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
||||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-deque"
|
||||
version = "0.8.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
|
||||
dependencies = [
|
||||
"crossbeam-epoch",
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.9.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
||||
dependencies = [
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.8.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
||||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
||||
|
||||
[[package]]
|
||||
name = "env_filter"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef"
|
||||
dependencies = [
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.11.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
"env_filter",
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "equivalent"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
||||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
version = "0.3.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fdeflate"
|
||||
version = "0.3.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"
|
||||
dependencies = [
|
||||
"simd-adler32",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "find-msvc-tools"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
|
||||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
version = "1.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
|
||||
dependencies = [
|
||||
"crc32fast",
|
||||
"miniz_oxide",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "funty"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
|
||||
|
||||
[[package]]
|
||||
name = "glob"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51"
|
||||
|
||||
[[package]]
|
||||
name = "image"
|
||||
version = "0.25.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"byteorder-lite",
|
||||
"moxcms",
|
||||
"num-traits",
|
||||
"png",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown",
|
||||
"rayon",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "is_terminal_polyfill"
|
||||
version = "1.70.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.185"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f"
|
||||
|
||||
[[package]]
|
||||
name = "libdeflate-sys"
|
||||
version = "1.25.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72753e0008ea87963d2f0770042d0df7abe51fafbb8dcaf618ac440f2f1fec0a"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libdeflater"
|
||||
version = "1.25.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d1ee41cf6fb1bb6030dfb59ffb7bc01ab26aade44142084c87f0fc7a1658fe71"
|
||||
dependencies = [
|
||||
"libdeflate-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.8.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
|
||||
dependencies = [
|
||||
"adler2",
|
||||
"simd-adler32",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "moxcms"
|
||||
version = "0.7.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac9557c559cd6fc9867e122e20d2cbefc9ca29d80d027a8e39310920ed2f0a97"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
"pxfm",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell_polyfill"
|
||||
version = "1.70.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
|
||||
|
||||
[[package]]
|
||||
name = "oxipng"
|
||||
version = "10.1.1"
|
||||
dependencies = [
|
||||
"bitvec",
|
||||
"clap",
|
||||
"env_logger",
|
||||
"glob",
|
||||
"image",
|
||||
"indexmap",
|
||||
"libdeflater",
|
||||
"log",
|
||||
"parse-size",
|
||||
"rayon",
|
||||
"rgb",
|
||||
"rustc-hash",
|
||||
"serde_json",
|
||||
"zopfli",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parse-size"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "487f2ccd1e17ce8c1bfab3a65c89525af41cfad4c8659021a1e9a2aacd73b89b"
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
|
||||
|
||||
[[package]]
|
||||
name = "png"
|
||||
version = "0.18.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"crc32fast",
|
||||
"fdeflate",
|
||||
"flate2",
|
||||
"miniz_oxide",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pxfm"
|
||||
version = "0.1.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0c5ccf5294c6ccd63a74f1565028353830a9c2f5eb0c682c355c471726a6e3f"
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "radium"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
|
||||
dependencies = [
|
||||
"either",
|
||||
"rayon-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon-core"
|
||||
version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
|
||||
dependencies = [
|
||||
"crossbeam-deque",
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rgb"
|
||||
version = "0.8.53"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-hash"
|
||||
version = "2.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.228"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
||||
dependencies = [
|
||||
"serde_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_core"
|
||||
version = "1.0.228"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.228"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.150"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"memchr",
|
||||
"serde",
|
||||
"serde_core",
|
||||
"zmij",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shlex"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||
|
||||
[[package]]
|
||||
name = "simd-adler32"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.117"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tap"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
|
||||
|
||||
[[package]]
|
||||
name = "terminal_size"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874"
|
||||
dependencies = [
|
||||
"rustix",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
||||
|
||||
[[package]]
|
||||
name = "utf8parse"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "windows-link"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.61.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
||||
dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wyz"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed"
|
||||
dependencies = [
|
||||
"tap",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zmij"
|
||||
version = "1.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
||||
|
||||
[[package]]
|
||||
name = "zopfli"
|
||||
version = "0.8.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"crc32fast",
|
||||
"log",
|
||||
"simd-adler32",
|
||||
]
|
||||
130
Cargo.toml
130
Cargo.toml
|
|
@ -1,35 +1,121 @@
|
|||
[package]
|
||||
name = "oxipng"
|
||||
version = "0.2.2"
|
||||
authors = ["Joshua Holmer <jholmer.in@gmail.com>"]
|
||||
categories = ["command-line-utilities", "compression"]
|
||||
description = "A lossless PNG compression optimizer"
|
||||
license = "MIT"
|
||||
documentation = "https://shssoichiro.github.io/oxipng/"
|
||||
homepage = "https://github.com/shssoichiro/oxipng"
|
||||
repository = "https://github.com/shssoichiro/oxipng"
|
||||
keywords = ["png", "image-compression", "optimization", "multi-threading", "lossless"]
|
||||
documentation = "https://docs.rs/oxipng"
|
||||
edition = "2024"
|
||||
exclude = [
|
||||
".editorconfig",
|
||||
".gitattributes",
|
||||
".github/*",
|
||||
".gitignore",
|
||||
".pre-commit-hooks.yaml",
|
||||
"Dockerfile",
|
||||
"scripts/*",
|
||||
"tests/*",
|
||||
"xtask/*",
|
||||
]
|
||||
homepage = "https://github.com/oxipng/oxipng"
|
||||
license = "MIT"
|
||||
name = "oxipng"
|
||||
repository = "https://github.com/oxipng/oxipng"
|
||||
version = "10.1.1"
|
||||
rust-version = "1.85.1"
|
||||
|
||||
[badges]
|
||||
travis-ci = { repository = "oxipng/oxipng", branch = "master" }
|
||||
maintenance = { status = "actively-developed" }
|
||||
|
||||
[[bin]]
|
||||
doc = false
|
||||
name = "oxipng"
|
||||
path = "src/main.rs"
|
||||
required-features = ["binary"]
|
||||
|
||||
[[bench]]
|
||||
name = "zopfli"
|
||||
required-features = ["zopfli"]
|
||||
|
||||
[dependencies]
|
||||
bitvec = "1.0.1"
|
||||
clap = { version = "4.6.0", optional = true, features = ["wrap_help"] }
|
||||
env_logger = { version = "0.11.10", optional = true, default-features = false, features = ["auto-color"] }
|
||||
image = { version = "0.25.9", optional = true, default-features = false, features = ["png"] }
|
||||
indexmap = "2.14.0"
|
||||
libdeflater = "1.25.2"
|
||||
log = "0.4.30"
|
||||
parse-size = { version = "1.1.0", optional = true }
|
||||
rayon = { version = "1.11.0", optional = true }
|
||||
rgb = "0.8.53"
|
||||
rustc-hash = "2.1.2"
|
||||
zopfli = { version = "0.8.3", optional = true, default-features = false, features = ["std", "zlib"] }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
glob = { version = "0.3.3", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
serde_json = "1.0.150"
|
||||
|
||||
[features]
|
||||
binary = ["dep:clap", "dep:glob", "dep:env_logger", "dep:parse-size"]
|
||||
default = ["binary", "parallel", "zopfli"]
|
||||
parallel = ["dep:rayon", "indexmap/rayon"]
|
||||
freestanding = ["libdeflater/freestanding"]
|
||||
sanity-checks = ["dep:image"]
|
||||
zopfli = ["dep:zopfli"]
|
||||
system-libdeflate = ["libdeflater/dynamic"]
|
||||
|
||||
[lib]
|
||||
name = "oxipng"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "oxipng"
|
||||
path = "src/main.rs"
|
||||
doc = false
|
||||
[profile.dev]
|
||||
opt-level = 2
|
||||
|
||||
[dependencies]
|
||||
bit-vec = "^0.4.2"
|
||||
byteorder = "^0.4.0"
|
||||
clap = "^1.5.4"
|
||||
crc = "^1.0.0"
|
||||
libc = "^0.2.4"
|
||||
libz-sys = "^1.0.0"
|
||||
num_cpus = "^0.2.11"
|
||||
regex = "^0.1.8"
|
||||
scoped-pool = "^0.1.8"
|
||||
[profile.release]
|
||||
lto = "fat"
|
||||
strip = "symbols"
|
||||
panic = "abort"
|
||||
|
||||
[dev-dependencies]
|
||||
image = "^0.6.1"
|
||||
[package.metadata.deb]
|
||||
assets = [
|
||||
["target/release/oxipng", "usr/bin/", "755"],
|
||||
["target/xtask/mangen/manpages/oxipng.1", "usr/share/man/man1/", "644"],
|
||||
["README.md", "usr/share/doc/oxipng/", "644"],
|
||||
["CHANGELOG.md", "usr/share/doc/oxipng/", "644"],
|
||||
]
|
||||
|
||||
[lints.rust]
|
||||
missing_copy_implementations = "deny"
|
||||
missing_debug_implementations = "deny"
|
||||
trivial_casts = "warn"
|
||||
trivial_numeric_casts = "warn"
|
||||
unused_import_braces = "warn"
|
||||
|
||||
[lints.clippy]
|
||||
cloned_instead_of_copied = "warn"
|
||||
expl_impl_clone_on_copy = "warn"
|
||||
float_cmp_const = "warn"
|
||||
if_not_else = "warn"
|
||||
ignored_unit_patterns = "warn"
|
||||
linkedlist = "warn"
|
||||
manual_let_else = "warn"
|
||||
map_flatten = "warn"
|
||||
map_unwrap_or = "warn"
|
||||
match_same_arms = "warn"
|
||||
mem_forget = "warn"
|
||||
missing_const_for_fn = "warn"
|
||||
mut_mut = "warn"
|
||||
mutex_integer = "warn"
|
||||
needless_continue = "warn"
|
||||
option_if_let_else = "warn"
|
||||
path_buf_push_overwrite = "warn"
|
||||
range_plus_one = "warn"
|
||||
redundant_clone = "warn"
|
||||
redundant_closure_for_method_calls = "warn"
|
||||
semicolon_if_nothing_returned = "warn"
|
||||
unnecessary_semicolon = "warn"
|
||||
unseparated_literal_suffix = "warn"
|
||||
use_self = "warn"
|
||||
useless_let_if_seq = "warn"
|
||||
|
|
|
|||
46
Dockerfile
Normal file
46
Dockerfile
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
# check=error=true
|
||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
|
||||
|
||||
FROM --platform=$BUILDPLATFORM rust:1.85.1-alpine AS base
|
||||
|
||||
RUN apk update && \
|
||||
apk add \
|
||||
gcc \
|
||||
g++ \
|
||||
clang
|
||||
|
||||
COPY --from=xx / /
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
RUN xx-info env
|
||||
|
||||
RUN xx-apk add \
|
||||
gcc \
|
||||
musl-dev \
|
||||
libdeflate
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cargo/git/db \
|
||||
--mount=type=cache,target=/root/.cargo/registry/cache \
|
||||
--mount=type=cache,target=/root/.cargo/registry/index \
|
||||
xx-cargo build --release && \
|
||||
xx-verify /src/target/$(xx-cargo --print-target-triple)/release/oxipng && \
|
||||
cp /src/target/$(xx-cargo --print-target-triple)/release/oxipng /src/target/oxipng
|
||||
|
||||
FROM scratch AS tool
|
||||
|
||||
LABEL org.opencontainers.image.title="Oxipng"
|
||||
LABEL org.opencontainers.image.description="Multithreaded PNG optimizer written in Rust"
|
||||
LABEL org.opencontainers.image.authors="Joshua Holmer <jholmer.in@gmail.com>"
|
||||
LABEL org.opencontainers.image.licenses="MIT"
|
||||
LABEL org.opencontainers.image.source="https://github.com/oxipng/oxipng"
|
||||
|
||||
COPY --from=base /src/target/oxipng /usr/local/bin/oxipng
|
||||
|
||||
WORKDIR /work
|
||||
ENTRYPOINT [ "oxipng" ]
|
||||
CMD [ "--help" ]
|
||||
227
MANUAL.txt
Normal file
227
MANUAL.txt
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
oxipng 10.1.0
|
||||
Losslessly improve compression of PNG files
|
||||
|
||||
Usage: oxipng [OPTIONS] <files>...
|
||||
|
||||
Arguments:
|
||||
<files>...
|
||||
File(s) to compress (use '-' for stdin)
|
||||
|
||||
Options:
|
||||
-o, --opt <level>
|
||||
Set the optimization level preset. The default level 2 is quite fast and provides good
|
||||
compression. Lower levels are faster, higher levels provide better compression, though
|
||||
with increasingly diminishing returns.
|
||||
|
||||
0 => --zc 5 --fast (filter chosen heuristically)
|
||||
1 => --zc 10 --fast (filter chosen heuristically)
|
||||
2 => --zc 11 -f 0,1,6,7 --fast
|
||||
3 => --zc 11 -f 0,7,8,9 --brute-level 1 --brute-lines 3
|
||||
4 => --zc 12 -f 0,7,8,9 --brute-level 1 --brute-lines 4
|
||||
5 => --zc 12 -f 0,1,2,5,6,7,8,9 --brute-level 4 --brute-lines 4
|
||||
6 => --zc 12 -f 0-9 --brute-level 5 --brute-lines 8
|
||||
max => (stable alias for the maximum level)
|
||||
|
||||
Manually specifying a compression option (zc, f, etc.) will override the optimization
|
||||
preset, regardless of the order you write the arguments.
|
||||
|
||||
[default: 2]
|
||||
|
||||
-r, --recursive
|
||||
When directories are given as input, traverse the directory trees and optimize all PNG
|
||||
files found (files with “.png” or “.apng” extension).
|
||||
|
||||
--dir <directory>
|
||||
Write output file(s) to <directory>. If the directory does not exist, it will be created.
|
||||
Note that this will not preserve the directory structure of the input files when used with
|
||||
'--recursive'.
|
||||
|
||||
--out <file>
|
||||
Write output file to <file>
|
||||
|
||||
--stdout
|
||||
Write output to stdout
|
||||
|
||||
-p, --preserve
|
||||
Preserve file permissions and timestamps if possible
|
||||
|
||||
-d, --dry-run
|
||||
Do not write any files, only show compression results
|
||||
|
||||
-s
|
||||
Strip safely-removable chunks, same as '--strip safe'
|
||||
|
||||
--strip <mode>
|
||||
Strip metadata chunks, where <mode> is one of:
|
||||
|
||||
safe => Strip all non-critical chunks, except for the following:
|
||||
cICP, iCCP, sRGB, pHYs, acTL, fcTL, fdAT
|
||||
all => Strip all non-critical chunks
|
||||
<list> => Strip chunks in the comma-separated list, e.g. 'bKGD,cHRM'
|
||||
|
||||
CAUTION: 'all' will convert APNGs to standard PNGs.
|
||||
|
||||
Please note that regardless of any options set, some chunks will necessarily be stripped
|
||||
when invalidated by the optimization:
|
||||
bKGD, sBIT, hIST: Stripped if the color type or bit depth changes.
|
||||
iDOT: Always stripped.
|
||||
caBX: Stripped if it contains C2PA metadata. If explicitly retained by `--keep`,
|
||||
optimization will be aborted.
|
||||
|
||||
The default when --strip is not passed is to keep all chunks that remain valid.
|
||||
|
||||
--keep <list>
|
||||
Strip all metadata chunks except those in the comma-separated list. The special value
|
||||
'display' includes chunks that affect the image appearance, equivalent to '--strip safe'.
|
||||
|
||||
E.g. '--keep eXIf,display' will strip chunks, keeping only eXIf and those that affect the
|
||||
image appearance.
|
||||
|
||||
-a, --alpha
|
||||
Perform additional optimization on images with an alpha channel, by altering the color
|
||||
values of fully transparent pixels. This is generally recommended for better compression,
|
||||
but take care as while this is “visually lossless”, it is technically a lossy
|
||||
transformation and may be unsuitable for some applications.
|
||||
|
||||
-i, --interlace <mode>
|
||||
Set the PNG interlacing mode, where <mode> is one of:
|
||||
|
||||
off => Remove interlacing from all images that are processed
|
||||
on => Apply Adam7 interlacing on all images that are processed
|
||||
keep => Keep the existing interlacing mode of each image
|
||||
|
||||
Note that interlacing can add 25-50% to the size of an optimized image. Only use it if you
|
||||
believe the benefits outweigh the costs for your use case.
|
||||
|
||||
[default: off]
|
||||
|
||||
--scale16
|
||||
Forcibly reduce images with 16 bits per channel to 8 bits per channel. This is a lossy
|
||||
operation but can provide significant savings when you have no need for higher depth.
|
||||
Reduction is performed by scaling the values such that, e.g. 0x00FF is reduced to 0x01
|
||||
rather than 0x00.
|
||||
|
||||
Without this flag, 16-bit images will only be reduced in depth if it can be done
|
||||
losslessly.
|
||||
|
||||
-v, --verbose...
|
||||
Show per-file info (use multiple times for more detail)
|
||||
|
||||
-q, --quiet
|
||||
Suppress all output messages
|
||||
|
||||
-j, --json
|
||||
Print results as JSON
|
||||
|
||||
-f, --filters <list>
|
||||
Perform compression trials with each of the given filter types. You can specify a
|
||||
comma-separated list, or a range of values. E.g. '-f 0-3' is the same as '-f 0,1,2,3'.
|
||||
|
||||
PNG delta filters (apply the same filter to every line)
|
||||
0 => None (recommended to always include this filter)
|
||||
1 => Sub
|
||||
2 => Up
|
||||
3 => Average
|
||||
4 => Paeth
|
||||
|
||||
Heuristic strategies (try to find the best delta filter for each line)
|
||||
5 => MinSum Minimum sum of absolute differences
|
||||
6 => Entropy Smallest Shannon entropy
|
||||
7 => Bigrams Lowest count of distinct bigrams
|
||||
8 => BigEnt Smallest Shannon entropy of bigrams
|
||||
9 => Brute Smallest compressed size (slow)
|
||||
|
||||
The default value depends on the optimization level preset.
|
||||
|
||||
--fast
|
||||
Perform a fast compression evaluation of each enabled filter, followed by a single main
|
||||
compression trial of the best result. Recommended if you have more filters enabled than
|
||||
CPU cores.
|
||||
|
||||
--zc <level>
|
||||
Deflate compression level (0-12) for main compression trials. The levels here are defined
|
||||
by the libdeflate compression library.
|
||||
|
||||
The default value depends on the optimization level preset.
|
||||
|
||||
--nb
|
||||
Do not change bit depth
|
||||
|
||||
--nc
|
||||
Do not change color type
|
||||
|
||||
--np
|
||||
Do not change color palette
|
||||
|
||||
--ng
|
||||
Do not change to or from grayscale
|
||||
|
||||
--nx
|
||||
Do not perform any transformations and do not deinterlace by default.
|
||||
|
||||
--nz
|
||||
Do not recompress IDAT unless required due to transformations. Recompression of other
|
||||
compressed chunks (such as iCCP) will also be disabled. Note that the combination of
|
||||
'--nx' and '--nz' will fully disable all optimization.
|
||||
|
||||
--fix
|
||||
Do not perform checksum validation of PNG chunks. This may allow some files with errors to
|
||||
be processed successfully. The output will always have correct checksums.
|
||||
|
||||
--force
|
||||
Write the output even if it is larger than the input
|
||||
|
||||
-z, --zopfli
|
||||
Use the much slower but stronger Zopfli compressor for main compression trials.
|
||||
Recommended use is with '-o max' and '--fast'.
|
||||
|
||||
--zi <iterations>
|
||||
Set the number of iterations to use for Zopfli compression. Using fewer iterations may
|
||||
speed up compression for large files. This option requires '--zopfli' to be set.
|
||||
|
||||
[default: 15]
|
||||
|
||||
--ziwi <iterations>
|
||||
Stop Zopfli compression after this number of iterations without improvement. Use this in
|
||||
conjunction with a high value for '--zi' to achieve better compression in reasonable time.
|
||||
|
||||
--brute-level <level>
|
||||
Set the libdeflate compression level to use with the Brute filter strategy. Sane values
|
||||
are 1-5. Higher values are not necessarily better.
|
||||
|
||||
--brute-lines <lines>
|
||||
Set the number of lines to compress at once with the Brute filter strategy. Sane values
|
||||
are 2-16. Higher values are not necessarily better.
|
||||
|
||||
--timeout <secs>
|
||||
Maximum amount of time, in seconds, to spend on optimizations. Oxipng will check the
|
||||
timeout before each transformation or compression trial, and will stop trying to optimize
|
||||
the file if the timeout is exceeded. Note that this does not cut short any operations that
|
||||
are already in progress, so it is currently of limited effectiveness for large files with
|
||||
high compression levels.
|
||||
|
||||
--max-raw-size <bytes>
|
||||
Maximum size to allow for the input image. If the raw, decompressed image data (or the
|
||||
file size) of the image exceeds this size, it will be skipped. This is useful for limiting
|
||||
memory usage or avoiding long processing times on large images. The value may be specified
|
||||
with a unit suffix such as k, KB, m, MB, etc.
|
||||
|
||||
The decompressed size of an image is roughly equal to width * height * bit-depth / 8. E.g.
|
||||
a 1920x1080 image with 24-bit color depth would be roughly 6MB.
|
||||
|
||||
-t, --threads <num>
|
||||
Set the maximum number of threads to use. Oxipng uses multithreading to evaluate multiple
|
||||
optimizations on the same file in parallel as well as process multiple files in parallel.
|
||||
You can set this to a lower value if you need to limit memory or CPU usage.
|
||||
|
||||
[default: num logical CPUs]
|
||||
|
||||
--sequential
|
||||
Process multiple files sequentially rather than in parallel. Use this if you need
|
||||
determinism in the processing order. Note this is not necessary if using '--threads 1'.
|
||||
|
||||
-h, --help
|
||||
Print help (see a summary with '-h')
|
||||
|
||||
-V, --version
|
||||
Print version
|
||||
167
README.md
167
README.md
|
|
@ -1,86 +1,163 @@
|
|||
# Oxipng
|
||||
|
||||
[](https://travis-ci.org/shssoichiro/oxipng)
|
||||
[](https://github.com/oxipng/oxipng/actions?query=branch%3Amaster)
|
||||
[](https://crates.io/crates/oxipng)
|
||||
[](https://github.com/shssoichiro/oxipng/blob/master/LICENSE)
|
||||
[](https://github.com/oxipng/oxipng/blob/master/LICENSE)
|
||||
[](https://docs.rs/oxipng)
|
||||
|
||||
## Overview
|
||||
|
||||
Oxipng is a lossless PNG compression optimizer.
|
||||
|
||||
**Note:** This package should be considered a beta. Although there are many tests in place,
|
||||
there is still a chance of data loss or corruption. You should backup your files before
|
||||
using this tool, unless you are very brave.
|
||||
|
||||
If you encounter an issue, please report it via the GitHub issues tab. Include as many details
|
||||
as possible.
|
||||
Oxipng is a multithreaded lossless PNG/APNG compression optimizer. It can be used via a command-line
|
||||
interface or as a library in other Rust programs. It is fast and highly effective.
|
||||
|
||||
## Installing
|
||||
|
||||
Oxipng can be installed from Cargo, via the following command:
|
||||
Oxipng for Windows can be downloaded via the
|
||||
[Releases](https://github.com/oxipng/oxipng/releases) section on its GitHub page. Recently,
|
||||
however, Oxipng has also been made available through package managers. Check the list below for
|
||||
up-to-date options.
|
||||
|
||||
For MacOS or Linux, it is recommended to install from your distro's package repository, provided
|
||||
Oxipng is available there in a not too outdated version for your use case.
|
||||
|
||||
Oxipng is known to be packaged for the environments listed below.
|
||||
|
||||
[](https://repology.org/project/oxipng/versions)
|
||||
|
||||
Alternatively, Oxipng can be installed from Cargo, via the following command:
|
||||
|
||||
```
|
||||
cargo install oxipng
|
||||
```
|
||||
|
||||
Alternatively, oxipng can be built from source using the latest stable or nightly Rust:
|
||||
Oxipng can also be built from source using the latest stable or nightly Rust.
|
||||
This is primarily useful for developing on Oxipng.
|
||||
|
||||
```
|
||||
git clone https://github.com/shssoichiro/oxipng.git
|
||||
git clone https://github.com/oxipng/oxipng.git
|
||||
cd oxipng
|
||||
cargo build --release
|
||||
cp target/release/oxipng /usr/local/bin
|
||||
```
|
||||
|
||||
Please note that zlib is a required build dependency. Oxipng should work with any 1.x version of zlib,
|
||||
but you are advised to use the latest version (currently 1.2.8) for security and bug fixes.
|
||||
|
||||
The current minimum supported Rust version is **1.6.0**. Oxipng may compile on earlier versions of Rust,
|
||||
but there is no guarantee.
|
||||
The current minimum supported Rust version is **1.85.1**.
|
||||
|
||||
Oxipng follows Semantic Versioning.
|
||||
|
||||
## Usage
|
||||
|
||||
Oxipng is a command-line utility. Basic usage looks similar to the following:
|
||||
Oxipng is a command-line utility. An example usage, suitable for web, may be the following:
|
||||
|
||||
```
|
||||
oxipng -o 4 -i 1 --strip safe *.png
|
||||
oxipng -o 4 --strip safe --alpha *.png
|
||||
```
|
||||
|
||||
The most commonly used options are as follows:
|
||||
* Optimization: `-o 1` through `-o 6`, lower is faster, higher is better compression.
|
||||
The default (`-o 2`) is sufficiently fast on a modern CPU and provides 30-50% compression
|
||||
gains over an unoptimized PNG. `-o 4` is 6 times slower than `-o 2` but can provide 5-10%
|
||||
extra compression over `-o 2`. Using any setting higher than `-o 4` is unlikely
|
||||
to give any extra compression gains and is not recommended.
|
||||
* Interlacing: `-i 1` will enable [Adam7](https://en.wikipedia.org/wiki/Adam7_algorithm)
|
||||
PNG interlacing on any images that are processed. `-i 0` will remove interlacing from all
|
||||
processed images. Not specifying either will keep the same interlacing state as the
|
||||
input image. Note: Interlacing can add 25-50% to the size of an optimized image. Only use
|
||||
it if you have a good reason. (*Not Yet Implemented*)
|
||||
* Strip: Used to remove metadata info from processed images. Used via `--strip [safe,all]`.
|
||||
Can save a few kilobytes if you don't need the metadata. "Safe" removes only metadata that
|
||||
will never affect rendering of the image. "All" removes all metadata that is not critical
|
||||
to the image. You can also pass a comma-separated list of specific metadata chunks to remove.
|
||||
|
||||
More advanced options can be found by running `oxipng -h`.
|
||||
- Optimization: `-o 0` through `-o 6` (or `-o max`), lower is faster, higher is better compression.
|
||||
The default (`-o 2`) is quite fast and provides good compression. Higher levels can be notably
|
||||
better* but generally have increasingly diminishing returns.
|
||||
- Strip: Used to remove metadata info from processed images. Used via `--strip [safe,all]`.
|
||||
Can save a few kilobytes if you don't need the metadata. "Safe" removes only metadata that
|
||||
will never affect rendering of the image. "All" removes all metadata that is not critical
|
||||
to the image. You can also pass a comma-separated list of specific metadata chunks to remove.
|
||||
`-s` can be used as a shorthand for `--strip safe`.
|
||||
- Alpha: `--alpha` can improve compression of images with transparency, by altering the color
|
||||
values of fully transparent pixels. This is generally recommended, but take care as this is
|
||||
technically a lossy transformation and may be unsuitable for some specific applications.
|
||||
|
||||
More advanced options can be found by running `oxipng --help`, or viewed [here](MANUAL.txt).
|
||||
|
||||
Some options have both short (`-a`) and long (`--alpha`) forms. Which form you use is just a
|
||||
matter of preference. Multiple short options can be combined together, e.g.:
|
||||
`-savvo6` is equivalent to to `--strip safe --alpha --verbose --verbose --opt 6`.
|
||||
All options are case-sensitive.
|
||||
|
||||
\* Note that oxipng is not a brute-force optimizer. This means that while higher optimization levels
|
||||
are almost always better or equal to lower levels, this is not guaranteed and it is possible in
|
||||
rare circumstances that a lower level may give a marginally smaller output. Similarly, using Zopfli
|
||||
compression (`-z`) is not guaranteed to always be better than default compression.
|
||||
|
||||
## APNG support
|
||||
|
||||
Oxipng currently only supports limited optimization of animated PNGs (APNGs). It can perform
|
||||
alpha-optimization, refiltering and recompression of all frames, but all transformations will be
|
||||
disabled. For best results, it is recommended to use another tool such as
|
||||
[apngopt](https://sourceforge.net/projects/apng/files/APNG_Optimizer/) before running Oxipng.
|
||||
|
||||
## Git integration via [pre-commit]
|
||||
|
||||
Create a `.pre-commit-config.yaml` file like this, or add the lines after the `repos` map
|
||||
preamble to an already existing one:
|
||||
|
||||
```yaml
|
||||
repos:
|
||||
- repo: https://github.com/oxipng/oxipng
|
||||
rev: v10.0.0
|
||||
hooks:
|
||||
- id: oxipng
|
||||
args: ["-o", "4", "--strip", "safe", "--alpha"]
|
||||
```
|
||||
[pre-commit]: https://pre-commit.com/
|
||||
|
||||
## Docker
|
||||
|
||||
A Docker image is availlable at [`ghcr.io/oxipng/oxipng`](https://github.com/oxipng/oxipng/pkgs/container/oxipng) for `linux/amd64` and `linux/arm64`.
|
||||
|
||||
You can use it the following way:
|
||||
|
||||
```bash
|
||||
docker run --rm -v $(pwd):/work ghcr.io/oxipng/oxipng -o 4 /work/file.png
|
||||
```
|
||||
|
||||
Some older images are also available at [`ghcr.io/shssoichiro/oxipng`](https://github.com/users/shssoichiro/packages/container/package/oxipng).
|
||||
|
||||
## Library Usage
|
||||
|
||||
Although originally intended to be used as an executable, Oxipng can also be used as a library in
|
||||
other Rust projects. To do so, simply add Oxipng as a dependency in your Cargo.toml. You should then
|
||||
have access to all of the library functions [documented here](https://docs.rs/oxipng). The simplest
|
||||
method of usage involves creating an [Options
|
||||
struct](https://docs.rs/oxipng/latest/oxipng/struct.Options.html) and passing it, along with an
|
||||
input filename, into the [optimize function](https://docs.rs/oxipng/latest/oxipng/fn.optimize.html).
|
||||
|
||||
It is recommended to disable the "binary" feature when including Oxipng as a library. Currently, there is
|
||||
no simple way to just disable one feature in Cargo, it has to be done by disabling default features
|
||||
and specifying the desired ones, for example:
|
||||
`oxipng = { version = "10.0", features = ["parallel", "zopfli", "filetime"], default-features = false }`
|
||||
|
||||
## Software using Oxipng
|
||||
|
||||
- [ImageOptim](https://imageoptim.com): Mac app and web service for optimizing images
|
||||
- [Squoosh](https://squoosh.app): Web app for optimizing images
|
||||
- [FileOptimizer](https://nikkhokkho.sourceforge.io/?page=FileOptimizer): Windows app for optimizing files
|
||||
- [Curtail](https://github.com/Huluti/Curtail): Linux app for optimizing images
|
||||
- [pyoxipng](https://pypi.org/project/pyoxipng/): Python wrapper for Oxipng
|
||||
- [jSquash](https://github.com/jamsinclair/jSquash): Collection of WebAssembly image codecs
|
||||
- [Trunk](https://trunk.io): Developer experience toolkit for managing code
|
||||
|
||||
## History
|
||||
|
||||
Oxipng began as a completely rewrite of the OptiPNG project,
|
||||
which is assumed to be dead as no commit has been made to it since March 2014.
|
||||
The name has been changed to avoid confusion and potential legal issues.
|
||||
|
||||
The core goal of rewriting OptiPNG was to implement multithreading,
|
||||
which would be very difficult to do within the existing C codebase of OptiPNG.
|
||||
Oxipng began in 2015 as a rewrite of the OptiPNG project. The core goal was to implement
|
||||
multithreading, which would have been very difficult to do within the existing C codebase of OptiPNG.
|
||||
This also served as an opportunity to choose a more modern, safer language (Rust).
|
||||
|
||||
However, Oxipng has evolved considerably since then. While some of the options remain similar to
|
||||
OptiPNG, the architecture and capabilities are now quite different. It is not a drop-in
|
||||
replacement - if you are migrating from OptiPNG, please check the [help](MANUAL.txt) before use.
|
||||
|
||||
## Contributing
|
||||
|
||||
Any contributions are welcome and will be accepted via pull request on GitHub. Bug reports can be
|
||||
filed via GitHub issues. If you have the capability to submit a fix with the bug report, it is
|
||||
preferred that you do so via pull request, however you do not need to be a Rust programmer to
|
||||
contribute. Other contributions (such as improving documentation or translations) are also
|
||||
welcome via GitHub.
|
||||
filed via GitHub issues. Please include as many details as possible. If you have the capability
|
||||
to submit a fix with the bug report, it is preferred that you do so via pull request,
|
||||
however you do not need to be a Rust developer to contribute.
|
||||
Other contributions (such as improving documentation or translations) are also welcome via GitHub.
|
||||
|
||||
## Benchmarks
|
||||
|
||||
An independent benchmark is linked here with permission by the author:\
|
||||
[oxipng and friends: A comparison of PNG optimization tools](https://op111.net/posts/2025/09/png-compression-oxipng-optipng-fileoptimizer-cwebp/)
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
|||
13
SECURITY.md
Normal file
13
SECURITY.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Only the latest version will be supported with security updates. We will not maintain old branches.
|
||||
For this reason, you should attempt to always use the latest released version.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To privately report a vulnerability in oxipng, please visit [our advisories page](https://github.com/oxipng/oxipng/security/advisories) and use the button to report a vulnerability.
|
||||
We will review it as soon as possible.
|
||||
|
||||
For vulnerabilities in dependencies, please open a pull request updating the dependency to a patched version.
|
||||
63
benches/deflate.rs
Normal file
63
benches/deflate.rs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
#![feature(test)]
|
||||
|
||||
extern crate oxipng;
|
||||
extern crate test;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use oxipng::{internal_tests::*, *};
|
||||
use test::Bencher;
|
||||
|
||||
#[bench]
|
||||
fn deflate_16_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| deflate(png.raw.data.as_ref(), 12, None));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deflate_8_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| deflate(png.raw.data.as_ref(), 12, None));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deflate_4_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_4_should_be_palette_4.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| deflate(png.raw.data.as_ref(), 12, None));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deflate_2_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_2_should_be_palette_2.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| deflate(png.raw.data.as_ref(), 12, None));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deflate_1_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_1_should_be_palette_1.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| deflate(png.raw.data.as_ref(), 12, None));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn inflate_generic(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| inflate(png.idat_data.as_ref(), png.raw.ihdr.raw_data_size()));
|
||||
}
|
||||
285
benches/filters.rs
Normal file
285
benches/filters.rs
Normal file
|
|
@ -0,0 +1,285 @@
|
|||
#![feature(test)]
|
||||
|
||||
extern crate oxipng;
|
||||
extern crate test;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use oxipng::{internal_tests::*, *};
|
||||
use test::Bencher;
|
||||
|
||||
#[bench]
|
||||
fn filters_16_bits_filter_0(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::NONE, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_8_bits_filter_0(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::NONE, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_4_bits_filter_0(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_4_should_be_palette_4.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::NONE, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_2_bits_filter_0(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_2_should_be_palette_2.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::NONE, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_1_bits_filter_0(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_1_should_be_palette_1.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::NONE, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_16_bits_filter_1(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::SUB, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_8_bits_filter_1(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::SUB, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_4_bits_filter_1(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_4_should_be_palette_4.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::SUB, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_2_bits_filter_1(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_2_should_be_palette_2.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::SUB, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_1_bits_filter_1(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_1_should_be_palette_1.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::SUB, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_16_bits_filter_2(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::UP, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_8_bits_filter_2(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::UP, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_4_bits_filter_2(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_4_should_be_palette_4.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::UP, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_2_bits_filter_2(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_2_should_be_palette_2.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::UP, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_1_bits_filter_2(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_1_should_be_palette_1.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::UP, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_16_bits_filter_3(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::AVERAGE, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_8_bits_filter_3(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::AVERAGE, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_4_bits_filter_3(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_4_should_be_palette_4.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::AVERAGE, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_2_bits_filter_3(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_2_should_be_palette_2.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::AVERAGE, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_1_bits_filter_3(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_1_should_be_palette_1.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::AVERAGE, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_16_bits_filter_4(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::PAETH, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_8_bits_filter_4(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::PAETH, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_4_bits_filter_4(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_4_should_be_palette_4.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::PAETH, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_2_bits_filter_4(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_2_should_be_palette_2.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::PAETH, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_1_bits_filter_4(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_1_should_be_palette_1.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::PAETH, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_16_bits_filter_5(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::MinSum, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_8_bits_filter_5(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::MinSum, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_4_bits_filter_5(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_4_should_be_palette_4.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::MinSum, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_2_bits_filter_5(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_2_should_be_palette_2.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::MinSum, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_1_bits_filter_5(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_1_should_be_palette_1.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::MinSum, false));
|
||||
}
|
||||
105
benches/interlacing.rs
Normal file
105
benches/interlacing.rs
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
#![feature(test)]
|
||||
|
||||
extern crate oxipng;
|
||||
extern crate test;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use oxipng::{internal_tests::*, *};
|
||||
use test::Bencher;
|
||||
|
||||
#[bench]
|
||||
fn interlacing_16_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.change_interlacing(true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn interlacing_8_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.change_interlacing(true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn interlacing_4_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_4_should_be_palette_4.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.change_interlacing(true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn interlacing_2_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_2_should_be_palette_2.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.change_interlacing(true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn interlacing_1_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_1_should_be_palette_1.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.change_interlacing(true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deinterlacing_16_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/interlaced_rgb_16_should_be_rgb_16.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.change_interlacing(false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deinterlacing_8_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/interlaced_rgb_8_should_be_rgb_8.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.change_interlacing(false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deinterlacing_4_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/interlaced_palette_4_should_be_palette_4.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.change_interlacing(false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deinterlacing_2_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/interlaced_palette_2_should_be_palette_2.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.change_interlacing(false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deinterlacing_1_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/interlaced_palette_1_should_be_palette_1.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.change_interlacing(false));
|
||||
}
|
||||
281
benches/reductions.rs
Normal file
281
benches/reductions.rs
Normal file
|
|
@ -0,0 +1,281 @@
|
|||
#![feature(test)]
|
||||
|
||||
extern crate oxipng;
|
||||
extern crate test;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use oxipng::{internal_tests::*, *};
|
||||
use test::Bencher;
|
||||
|
||||
#[bench]
|
||||
fn reductions_16_to_8_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| bit_depth::reduced_bit_depth_16_to_8(&png.raw, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_16_to_8_bits_scaled(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| bit_depth::reduced_bit_depth_16_to_8(&png.raw, true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_8_to_4_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_8_should_be_palette_4.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| bit_depth::reduced_bit_depth_8_or_less(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_8_to_2_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_8_should_be_palette_2.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| bit_depth::reduced_bit_depth_8_or_less(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_8_to_1_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_8_should_be_palette_1.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| bit_depth::reduced_bit_depth_8_or_less(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_grayscale_8_to_4_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/grayscale_8_should_be_grayscale_4.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| bit_depth::reduced_bit_depth_8_or_less(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_grayscale_8_to_2_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/grayscale_8_should_be_grayscale_2.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| bit_depth::reduced_bit_depth_8_or_less(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_grayscale_8_to_1_bits(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/grayscale_8_should_be_grayscale_1.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| bit_depth::reduced_bit_depth_8_or_less(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_rgba_to_rgb_16(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgba_16_should_be_rgb_16.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| alpha::reduced_alpha_channel(&png.raw, true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_rgba_to_rgb_8(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgba_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| alpha::reduced_alpha_channel(&png.raw, true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_rgba_to_rgb_trns_8(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgba_8_should_be_rgb_trns_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| alpha::reduced_alpha_channel(&png.raw, true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_rgba_to_grayscale_alpha_16(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/rgba_16_should_be_grayscale_alpha_16.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| color::reduced_rgb_to_grayscale(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_rgba_to_grayscale_alpha_8(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/rgba_8_should_be_grayscale_alpha_8.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| color::reduced_rgb_to_grayscale(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_rgb_to_grayscale_16(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/rgb_16_should_be_grayscale_16.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| color::reduced_rgb_to_grayscale(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_rgb_to_grayscale_8(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_grayscale_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| color::reduced_rgb_to_grayscale(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_rgba_to_palette_8(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgba_8_should_be_palette_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| color::reduced_to_indexed(&png.raw, true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_rgb_to_palette_8(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_palette_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| color::reduced_to_indexed(&png.raw, true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_grayscale_alpha_to_grayscale_16(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/grayscale_alpha_16_should_be_grayscale_16.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| alpha::reduced_alpha_channel(&png.raw, true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_grayscale_alpha_to_grayscale_8(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/grayscale_alpha_8_should_be_grayscale_8.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| alpha::reduced_alpha_channel(&png.raw, true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_grayscale_alpha_to_grayscale_trns_8(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/grayscale_alpha_8_should_be_grayscale_trns_8.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| alpha::reduced_alpha_channel(&png.raw, true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_grayscale_8_to_palette_8(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/grayscale_8_should_be_palette_8.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| color::reduced_to_indexed(&png.raw, true));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_palette_8_to_grayscale_8(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_8_should_be_grayscale_8.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| color::indexed_to_channels(&png.raw, true, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_palette_duplicate_reduction(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_should_be_reduced_with_dupes.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| palette::reduced_palette(&png.raw, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_palette_unused_reduction(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_should_be_reduced_with_unused.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| palette::reduced_palette(&png.raw, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_palette_full_reduction(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_should_be_reduced_with_both.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| palette::reduced_palette(&png.raw, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_palette_sort(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_8_should_be_palette_8.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| palette::sorted_palette(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_palette_sort_mzeng(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_8_should_be_palette_8.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| palette::sorted_palette_mzeng(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_palette_sort_battiato(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_8_should_be_palette_8.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| palette::sorted_palette_battiato(&png.raw));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn reductions_alpha(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgba_8_reduce_alpha.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| alpha::cleaned_alpha_channel(&png.raw));
|
||||
}
|
||||
57
benches/strategies.rs
Normal file
57
benches/strategies.rs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
#![feature(test)]
|
||||
|
||||
extern crate oxipng;
|
||||
extern crate test;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use oxipng::{internal_tests::*, *};
|
||||
use test::Bencher;
|
||||
|
||||
#[bench]
|
||||
fn filters_minsum(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::MinSum, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_entropy(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::Entropy, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_bigrams(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::Bigrams, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_bigent(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| png.raw.filter_image(FilterStrategy::BigEnt, false));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn filters_brute(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| {
|
||||
png.raw.filter_image(
|
||||
FilterStrategy::Brute {
|
||||
num_lines: 4,
|
||||
level: 1,
|
||||
},
|
||||
false,
|
||||
)
|
||||
});
|
||||
}
|
||||
65
benches/zopfli.rs
Normal file
65
benches/zopfli.rs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
#![feature(test)]
|
||||
|
||||
extern crate oxipng;
|
||||
extern crate test;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use oxipng::{internal_tests::*, *};
|
||||
use test::Bencher;
|
||||
|
||||
#[bench]
|
||||
fn zopfli_16_bits_strategy_0(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| {
|
||||
zopfli_deflate(png.raw.data.as_ref(), ZopfliOptions::default()).ok();
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn zopfli_8_bits_strategy_0(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| {
|
||||
zopfli_deflate(png.raw.data.as_ref(), ZopfliOptions::default()).ok();
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn zopfli_4_bits_strategy_0(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_4_should_be_palette_4.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| {
|
||||
zopfli_deflate(png.raw.data.as_ref(), ZopfliOptions::default()).ok();
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn zopfli_2_bits_strategy_0(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_2_should_be_palette_2.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| {
|
||||
zopfli_deflate(png.raw.data.as_ref(), ZopfliOptions::default()).ok();
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn zopfli_1_bits_strategy_0(b: &mut Bencher) {
|
||||
let input = test::black_box(PathBuf::from(
|
||||
"tests/files/palette_1_should_be_palette_1.png",
|
||||
));
|
||||
let png = PngData::new(&input, &Options::default()).unwrap();
|
||||
|
||||
b.iter(|| {
|
||||
zopfli_deflate(png.raw.data.as_ref(), ZopfliOptions::default()).ok();
|
||||
});
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
These documentation pages include resources by third parties. This copyright
|
||||
file applies only to those resources. The following third party resources are
|
||||
included, and carry their own copyright notices and license terms:
|
||||
|
||||
* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff):
|
||||
|
||||
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
|
||||
with Reserved Font Name Fira Sans.
|
||||
|
||||
Copyright (c) 2014, Telefonica S.A.
|
||||
|
||||
Licensed under the SIL Open Font License, Version 1.1.
|
||||
See FiraSans-LICENSE.txt.
|
||||
|
||||
* Heuristica (Heuristica-Italic.woff):
|
||||
|
||||
Copyright 1989, 1991 Adobe Systems Incorporated. All rights reserved.
|
||||
Utopia is either a registered trademark or trademark of Adobe Systems
|
||||
Incorporated in the United States and/or other countries. Used under
|
||||
license.
|
||||
|
||||
Copyright 2006 Han The Thanh, Vntopia font family, http://vntex.sf.net
|
||||
|
||||
Copyright (c) 2008-2012, Andrey V. Panov (panov@canopus.iacp.dvo.ru),
|
||||
with Reserved Font Name Heuristica.
|
||||
|
||||
Licensed under the SIL Open Font License, Version 1.1.
|
||||
See Heuristica-LICENSE.txt.
|
||||
|
||||
* jQuery (jquery-2.1.4.min.js):
|
||||
|
||||
Copyright 2005, 2015 jQuery Foundation, Inc.
|
||||
Licensed under the MIT license (see LICENSE-MIT.txt).
|
||||
|
||||
* rustdoc.css, main.js, and playpen.js:
|
||||
|
||||
Copyright 2015 The Rust Developers.
|
||||
Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or
|
||||
the MIT license (LICENSE-MIT.txt) at your option.
|
||||
|
||||
* normalize.css:
|
||||
|
||||
Copyright (c) Nicolas Gallagher and Jonathan Neal.
|
||||
Licensed under the MIT license (see LICENSE-MIT.txt).
|
||||
|
||||
* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff):
|
||||
|
||||
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
|
||||
with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark
|
||||
of Adobe Systems Incorporated in the United States and/or other countries.
|
||||
|
||||
Licensed under the SIL Open Font License, Version 1.1.
|
||||
See SourceCodePro-LICENSE.txt.
|
||||
|
||||
* Source Serif Pro (SourceSerifPro-Regular.woff, SourceSerifPro-Bold.woff):
|
||||
|
||||
Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with
|
||||
Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of
|
||||
Adobe Systems Incorporated in the United States and/or other countries.
|
||||
|
||||
Licensed under the SIL Open Font License, Version 1.1.
|
||||
See SourceSerifPro-LICENSE.txt.
|
||||
|
||||
This copyright file is intended to be distributed with rustdoc output.
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
|
||||
with Reserved Font Name Fira Sans.
|
||||
|
||||
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
|
||||
with Reserved Font Name Fira Mono.
|
||||
|
||||
Copyright (c) 2014, Telefonica S.A.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,101 +0,0 @@
|
|||
Copyright 1989, 1991 Adobe Systems Incorporated. All rights reserved.
|
||||
Utopia is either a registered trademark or trademark of Adobe Systems
|
||||
Incorporated in the United States and/or other countries. Used under
|
||||
license.
|
||||
|
||||
Copyright 2006 Han The Thanh, Vntopia font family, http://vntex.sf.net
|
||||
|
||||
Copyright (c) 2008-2012, Andrey V. Panov (panov@canopus.iacp.dvo.ru),
|
||||
with Reserved Font Name Heuristica.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
|
@ -1,201 +0,0 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
|
||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,93 +0,0 @@
|
|||
Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
|
||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
initSidebarItems({"struct":[["Match","Records a match in the search text."],["Matches","An iterator of non-overlapping matches for in-memory text."],["MatchesOverlapping","An iterator of overlapping matches for in-memory text."],["StreamMatches","An iterator of non-overlapping matches for streaming text."],["StreamMatchesOverlapping","An iterator of overlapping matches for streaming text."]],"trait":[["Automaton","An abstraction over automatons and their corresponding iterators. The type parameter `P` is the type of the pattern that was used to construct this Automaton."]]});
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../aho_corasick/struct.Match.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../aho_corasick/struct.Match.html">../../aho_corasick/struct.Match.html</a>...</p>
|
||||
<script>location.replace("../../aho_corasick/struct.Match.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../aho_corasick/struct.Matches.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../aho_corasick/struct.Matches.html">../../aho_corasick/struct.Matches.html</a>...</p>
|
||||
<script>location.replace("../../aho_corasick/struct.Matches.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../aho_corasick/struct.MatchesOverlapping.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../aho_corasick/struct.MatchesOverlapping.html">../../aho_corasick/struct.MatchesOverlapping.html</a>...</p>
|
||||
<script>location.replace("../../aho_corasick/struct.MatchesOverlapping.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../aho_corasick/struct.StreamMatches.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../aho_corasick/struct.StreamMatches.html">../../aho_corasick/struct.StreamMatches.html</a>...</p>
|
||||
<script>location.replace("../../aho_corasick/struct.StreamMatches.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../aho_corasick/struct.StreamMatchesOverlapping.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../aho_corasick/struct.StreamMatchesOverlapping.html">../../aho_corasick/struct.StreamMatchesOverlapping.html</a>...</p>
|
||||
<script>location.replace("../../aho_corasick/struct.StreamMatchesOverlapping.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../aho_corasick/trait.Automaton.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../aho_corasick/trait.Automaton.html">../../aho_corasick/trait.Automaton.html</a>...</p>
|
||||
<script>location.replace("../../aho_corasick/trait.Automaton.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1 +0,0 @@
|
|||
initSidebarItems({"struct":[["FullAcAutomaton","A complete Aho-Corasick automaton."]]});
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../aho_corasick/struct.FullAcAutomaton.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../aho_corasick/struct.FullAcAutomaton.html">../../aho_corasick/struct.FullAcAutomaton.html</a>...</p>
|
||||
<script>location.replace("../../aho_corasick/struct.FullAcAutomaton.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,322 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `aho_corasick` crate.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, aho_corasick">
|
||||
|
||||
<title>aho_corasick - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'></p><script>window.sidebarCurrent = {name: 'aho_corasick', ty: 'mod', relpath: '../'};</script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>aho_corasick</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-0' class='srclink' href='../src/aho_corasick/lib.rs.html.html#1-919' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>An implementation of the
|
||||
<a href="https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm">Aho-Corasick string search algorithm</a>.</p>
|
||||
|
||||
<p>The Aho-Corasick algorithm is principally useful when you need to search many
|
||||
large texts for a fixed (possibly large) set of keywords. In particular, the
|
||||
Aho-Corasick algorithm preprocesses the set of keywords by constructing a
|
||||
finite state machine. The search phase is then a quick linear scan through the
|
||||
text. Each character in the search text causes a state transition in the
|
||||
automaton. Matches are reported when the automaton enters a match state.</p>
|
||||
|
||||
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
|
||||
<p>The main type exposed by this crate is <code>AcAutomaton</code>, which can be constructed
|
||||
from an iterator of pattern strings:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>aho_corasick</span>::{<span class='ident'>Automaton</span>, <span class='ident'>AcAutomaton</span>};
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>aut</span> <span class='op'>=</span> <span class='ident'>AcAutomaton</span>::<span class='ident'>new</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>"apple"</span>, <span class='string'>"maple"</span>]);
|
||||
|
||||
<span class='comment'>// AcAutomaton also implements `FromIterator`:</span>
|
||||
<span class='kw'>let</span> <span class='ident'>aut</span>: <span class='ident'>AcAutomaton</span><span class='op'><</span><span class='kw-2'>&</span><span class='ident'>str</span><span class='op'>></span> <span class='op'>=</span> [<span class='string'>"apple"</span>, <span class='string'>"maple"</span>].<span class='ident'>iter</span>().<span class='ident'>cloned</span>().<span class='ident'>collect</span>();</pre>
|
||||
|
||||
<p>Finding matches can be done with <code>find</code>:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>aho_corasick</span>::{<span class='ident'>Automaton</span>, <span class='ident'>AcAutomaton</span>, <span class='ident'>Match</span>};
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>aut</span> <span class='op'>=</span> <span class='ident'>AcAutomaton</span>::<span class='ident'>new</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>"apple"</span>, <span class='string'>"maple"</span>]);
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>it</span> <span class='op'>=</span> <span class='ident'>aut</span>.<span class='ident'>find</span>(<span class='string'>"I like maple apples."</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>it</span>.<span class='ident'>next</span>(), <span class='prelude-val'>Some</span>(<span class='ident'>Match</span> {
|
||||
<span class='ident'>pati</span>: <span class='number'>1</span>,
|
||||
<span class='ident'>start</span>: <span class='number'>7</span>,
|
||||
<span class='ident'>end</span>: <span class='number'>12</span>,
|
||||
}));
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>it</span>.<span class='ident'>next</span>(), <span class='prelude-val'>Some</span>(<span class='ident'>Match</span> {
|
||||
<span class='ident'>pati</span>: <span class='number'>0</span>,
|
||||
<span class='ident'>start</span>: <span class='number'>13</span>,
|
||||
<span class='ident'>end</span>: <span class='number'>18</span>,
|
||||
}));
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>it</span>.<span class='ident'>next</span>(), <span class='prelude-val'>None</span>);</pre>
|
||||
|
||||
<p>Use <code>find_overlapping</code> if you want to report all matches, even if they
|
||||
overlap with each other.</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>aho_corasick</span>::{<span class='ident'>Automaton</span>, <span class='ident'>AcAutomaton</span>, <span class='ident'>Match</span>};
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>aut</span> <span class='op'>=</span> <span class='ident'>AcAutomaton</span>::<span class='ident'>new</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>"abc"</span>, <span class='string'>"a"</span>]);
|
||||
<span class='kw'>let</span> <span class='ident'>matches</span>: <span class='ident'>Vec</span><span class='op'><</span>_<span class='op'>></span> <span class='op'>=</span> <span class='ident'>aut</span>.<span class='ident'>find_overlapping</span>(<span class='string'>"abc"</span>).<span class='ident'>collect</span>();
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>matches</span>, <span class='macro'>vec</span><span class='macro'>!</span>[
|
||||
<span class='ident'>Match</span> { <span class='ident'>pati</span>: <span class='number'>1</span>, <span class='ident'>start</span>: <span class='number'>0</span>, <span class='ident'>end</span>: <span class='number'>1</span>}, <span class='ident'>Match</span> { <span class='ident'>pati</span>: <span class='number'>0</span>, <span class='ident'>start</span>: <span class='number'>0</span>, <span class='ident'>end</span>: <span class='number'>3</span> },
|
||||
]);
|
||||
|
||||
<span class='comment'>// Regular `find` will report only one match:</span>
|
||||
<span class='kw'>let</span> <span class='ident'>matches</span>: <span class='ident'>Vec</span><span class='op'><</span>_<span class='op'>></span> <span class='op'>=</span> <span class='ident'>aut</span>.<span class='ident'>find</span>(<span class='string'>"abc"</span>).<span class='ident'>collect</span>();
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>matches</span>, <span class='macro'>vec</span><span class='macro'>!</span>[<span class='ident'>Match</span> { <span class='ident'>pati</span>: <span class='number'>1</span>, <span class='ident'>start</span>: <span class='number'>0</span>, <span class='ident'>end</span>: <span class='number'>1</span>}]);</pre>
|
||||
|
||||
<p>Finally, there are also methods for finding matches on <em>streams</em>. Namely, the
|
||||
search text does not have to live in memory. It's useful to run this on files
|
||||
that can't fit into memory:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>fs</span>::<span class='ident'>File</span>;
|
||||
|
||||
<span class='kw'>use</span> <span class='ident'>aho_corasick</span>::{<span class='ident'>Automaton</span>, <span class='ident'>AcAutomaton</span>};
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>aut</span> <span class='op'>=</span> <span class='ident'>AcAutomaton</span>::<span class='ident'>new</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>"foo"</span>, <span class='string'>"bar"</span>, <span class='string'>"baz"</span>]);
|
||||
<span class='kw'>let</span> <span class='ident'>rdr</span> <span class='op'>=</span> <span class='ident'>File</span>::<span class='ident'>open</span>(<span class='string'>"search.txt"</span>).<span class='ident'>unwrap</span>();
|
||||
<span class='kw'>for</span> <span class='ident'>m</span> <span class='kw'>in</span> <span class='ident'>aut</span>.<span class='ident'>stream_find</span>(<span class='ident'>rdr</span>) {
|
||||
<span class='kw'>let</span> <span class='ident'>m</span> <span class='op'>=</span> <span class='ident'>m</span>.<span class='ident'>unwrap</span>(); <span class='comment'>// could be an IO error</span>
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"Pattern '{}' matched at: ({}, {})"</span>,
|
||||
<span class='ident'>aut</span>.<span class='ident'>pattern</span>(<span class='ident'>m</span>.<span class='ident'>pati</span>), <span class='ident'>m</span>.<span class='ident'>start</span>, <span class='ident'>m</span>.<span class='ident'>end</span>);
|
||||
}</pre>
|
||||
|
||||
<p>There is also <code>stream_find_overlapping</code>, which is just like <code>find_overlapping</code>,
|
||||
but it operates on streams.</p>
|
||||
|
||||
<p>Please see <code>dict-search.rs</code> in this crate's <code>examples</code> directory for a more
|
||||
complete example. It creates a large automaton from a dictionary and can do a
|
||||
streaming match over arbitrarily large data.</p>
|
||||
|
||||
<h1 id='memory-usage' class='section-header'><a href='#memory-usage'>Memory usage</a></h1>
|
||||
<p>A key aspect of an Aho-Corasick implementation is how the state transitions
|
||||
are represented. The easiest way to make the automaton fast is to store a
|
||||
sparse 256-slot map in each state. It maps an input byte to a state index.
|
||||
This makes the matching loop extremely fast, since it translates to a simple
|
||||
pointer read.</p>
|
||||
|
||||
<p>The problem is that as the automaton accumulates more states, you end up paying
|
||||
a <code>256 * 4</code> (<code>4</code> is for the <code>u32</code> state index) byte penalty for every state
|
||||
regardless of how many transitions it has.</p>
|
||||
|
||||
<p>To solve this, only states near the root of the automaton have this sparse
|
||||
map representation. States near the leaves of the automaton use a dense mapping
|
||||
that requires a linear scan.</p>
|
||||
|
||||
<p>(The specific limit currently set is <code>3</code>, so that states with a depth less than
|
||||
or equal to <code>3</code> are less memory efficient. The result is that the memory usage
|
||||
of the automaton stops growing rapidly past ~60MB, even for automatons with
|
||||
thousands of patterns.)</p>
|
||||
|
||||
<p>If you'd like to opt for the less-memory-efficient-but-faster version, then
|
||||
you can construct an <code>AcAutomaton</code> with a <code>Sparse</code> transition strategy:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>aho_corasick</span>::{<span class='ident'>Automaton</span>, <span class='ident'>AcAutomaton</span>, <span class='ident'>Match</span>, <span class='ident'>Sparse</span>};
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>aut</span> <span class='op'>=</span> <span class='ident'>AcAutomaton</span>::<span class='op'><</span><span class='kw-2'>&</span><span class='ident'>str</span>, <span class='ident'>Sparse</span><span class='op'>></span>::<span class='ident'>with_transitions</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>"abc"</span>, <span class='string'>"a"</span>]);
|
||||
<span class='kw'>let</span> <span class='ident'>matches</span>: <span class='ident'>Vec</span><span class='op'><</span>_<span class='op'>></span> <span class='op'>=</span> <span class='ident'>aut</span>.<span class='ident'>find</span>(<span class='string'>"abc"</span>).<span class='ident'>collect</span>();
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>matches</span>, <span class='macro'>vec</span><span class='macro'>!</span>[<span class='ident'>Match</span> { <span class='ident'>pati</span>: <span class='number'>1</span>, <span class='ident'>start</span>: <span class='number'>0</span>, <span class='ident'>end</span>: <span class='number'>1</span>}]);</pre>
|
||||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.AcAutomaton.html'
|
||||
title='aho_corasick::AcAutomaton'>AcAutomaton</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An Aho-Corasick finite automaton.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Dense.html'
|
||||
title='aho_corasick::Dense'>Dense</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>State transitions that can be stored either sparsely or densely.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.FullAcAutomaton.html'
|
||||
title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A complete Aho-Corasick automaton.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Match.html'
|
||||
title='aho_corasick::Match'>Match</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Records a match in the search text.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Matches.html'
|
||||
title='aho_corasick::Matches'>Matches</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An iterator of non-overlapping matches for in-memory text.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.MatchesOverlapping.html'
|
||||
title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An iterator of overlapping matches for in-memory text.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Sparse.html'
|
||||
title='aho_corasick::Sparse'>Sparse</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>State transitions that are always sparse.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.StreamMatches.html'
|
||||
title='aho_corasick::StreamMatches'>StreamMatches</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An iterator of non-overlapping matches for streaming text.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.StreamMatchesOverlapping.html'
|
||||
title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An iterator of overlapping matches for streaming text.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='trait' href='trait.Automaton.html'
|
||||
title='aho_corasick::Automaton'>Automaton</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An abstraction over automatons and their corresponding iterators.
|
||||
The type parameter <code>P</code> is the type of the pattern that was used to
|
||||
construct this Automaton.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='trait' href='trait.Transitions.html'
|
||||
title='aho_corasick::Transitions'>Transitions</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An abstraction over state transition strategies.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='type' href='type.StateIdx.html'
|
||||
title='aho_corasick::StateIdx'>StateIdx</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>The integer type used for the state index.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1 +0,0 @@
|
|||
initSidebarItems({"struct":[["AcAutomaton","An Aho-Corasick finite automaton."],["Dense","State transitions that can be stored either sparsely or densely."],["FullAcAutomaton","A complete Aho-Corasick automaton."],["Match","Records a match in the search text."],["Matches","An iterator of non-overlapping matches for in-memory text."],["MatchesOverlapping","An iterator of overlapping matches for in-memory text."],["Sparse","State transitions that are always sparse."],["StreamMatches","An iterator of non-overlapping matches for streaming text."],["StreamMatchesOverlapping","An iterator of overlapping matches for streaming text."]],"trait":[["Automaton","An abstraction over automatons and their corresponding iterators. The type parameter `P` is the type of the pattern that was used to construct this Automaton."],["Transitions","An abstraction over state transition strategies."]],"type":[["StateIdx","The integer type used for the state index."]]});
|
||||
|
|
@ -1,150 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `AcAutomaton` struct in crate `aho_corasick`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, AcAutomaton">
|
||||
|
||||
<title>aho_corasick::AcAutomaton - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'AcAutomaton', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>AcAutomaton</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-480' class='srclink' href='../src/aho_corasick/lib.rs.html.html#186-190' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct AcAutomaton<P, T = <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a>> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>An Aho-Corasick finite automaton.</p>
|
||||
|
||||
<p>The type parameter <code>P</code> is the type of the pattern that was used to
|
||||
construct this AcAutomaton.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl<P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>> <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a><P></code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a><I>(pats: I) -> <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a><P, <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a>> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=P></span></code></h4>
|
||||
<div class='docblock'><p>Create a new automaton from an iterator of patterns.</p>
|
||||
|
||||
<p>The patterns must be convertible to bytes (<code>&[u8]</code>) via the <code>AsRef</code>
|
||||
trait.</p>
|
||||
</div></div><h3 class='impl'><code>impl<P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>, T: <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a>> <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a><P, T></code></h3><div class='impl-items'><h4 id='method.with_transitions' class='method'><code>fn <a href='#method.with_transitions' class='fnname'>with_transitions</a><I>(pats: I) -> <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a><P, T> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=P></span></code></h4>
|
||||
<div class='docblock'><p>Create a new automaton from an iterator of patterns.</p>
|
||||
|
||||
<p>This constructor allows one to choose the transition representation.</p>
|
||||
|
||||
<p>The patterns must be convertible to bytes (<code>&[u8]</code>) via the <code>AsRef</code>
|
||||
trait.</p>
|
||||
</div><h4 id='method.into_full' class='method'><code>fn <a href='#method.into_full' class='fnname'>into_full</a>(self) -> <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a><P></code></h4>
|
||||
<div class='docblock'><p>Build out the entire automaton into a single matrix.</p>
|
||||
|
||||
<p>This will make searching as fast as possible at the expense of using
|
||||
at least <code>4 * 256 * #states</code> bytes of memory.</p>
|
||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>, T: <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a>> <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> for <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a><P, T></code></h3><div class='impl-items'><h4 id='method.next_state' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.next_state' class='fnname'>next_state</a>(&self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, b: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a></code></h4>
|
||||
<h4 id='method.get_match' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.get_match' class='fnname'>get_match</a>(&self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, texti: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h4>
|
||||
<h4 id='method.has_match' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.has_match' class='fnname'>has_match</a>(&self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.start_bytes' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.start_bytes' class='fnname'>start_bytes</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code></h4>
|
||||
<h4 id='method.patterns' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.patterns' class='fnname'>patterns</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a>P<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code></h4>
|
||||
<h4 id='method.pattern' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.pattern' class='fnname'>pattern</a>(&self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> &P</code></h4>
|
||||
<h4 id='method.len' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.len' class='fnname'>len</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
<h4 id='method.is_empty' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.find' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.find' class='fnname'>find</a><'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>>(&'a self, s: &'s Q) -> <a class='struct' href='../aho_corasick/struct.Matches.html' title='aho_corasick::Matches'>Matches</a><'a, 's, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
|
||||
<h4 id='method.find_overlapping' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.find_overlapping' class='fnname'>find_overlapping</a><'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>>(&'a self, s: &'s Q) -> <a class='struct' href='../aho_corasick/struct.MatchesOverlapping.html' title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a><'a, 's, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
|
||||
<h4 id='method.stream_find' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.stream_find' class='fnname'>stream_find</a><'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>>(&'a self, rdr: R) -> <a class='struct' href='../aho_corasick/struct.StreamMatches.html' title='aho_corasick::StreamMatches'>StreamMatches</a><'a, R, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
|
||||
<h4 id='method.stream_find_overlapping' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.stream_find_overlapping' class='fnname'>stream_find_overlapping</a><'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>>(&'a self, rdr: R) -> <a class='struct' href='../aho_corasick/struct.StreamMatchesOverlapping.html' title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a><'a, R, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
|
||||
</div><h3 class='impl'><code>impl<S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a><S> for <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a><S></code></h3><div class='impl-items'><h4 id='method.from_iter' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html#method.from_iter' class='fnname'>from_iter</a><T>(it: T) -> <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a><S> <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=S></span></code></h4>
|
||||
</div><h3 class='impl'><code>impl<P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, T: <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a><P, T></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl<P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>, T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a><P, T></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a><P, T></code></h4>
|
||||
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,121 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Dense` struct in crate `aho_corasick`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Dense">
|
||||
|
||||
<title>aho_corasick::Dense - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'Dense', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>Dense</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-631' class='srclink' href='../src/aho_corasick/lib.rs.html.html#418' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Dense(_);</pre><div class='docblock'><p>State transitions that can be stored either sparsely or densely.</p>
|
||||
|
||||
<p>This uses less space but at the expense of slower matching.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a> for <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a></code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.new' class='fnname'>new</a>(depth: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>) -> <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a></code></h4>
|
||||
<h4 id='method.goto' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.goto' class='fnname'>goto</a>(&self, b1: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a></code></h4>
|
||||
<h4 id='method.set_goto' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.set_goto' class='fnname'>set_goto</a>(&mut self, b: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>)</code></h4>
|
||||
<h4 id='method.heap_bytes' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.heap_bytes' class='fnname'>heap_bytes</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a></code></h4>
|
||||
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,139 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `FullAcAutomaton` struct in crate `aho_corasick`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, FullAcAutomaton">
|
||||
|
||||
<title>aho_corasick::FullAcAutomaton - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'FullAcAutomaton', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>FullAcAutomaton</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-374' class='srclink' href='../src/aho_corasick/full.rs.html.html#20-25' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct FullAcAutomaton<P> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>A complete Aho-Corasick automaton.</p>
|
||||
|
||||
<p>This uses a single transition matrix that permits each input character
|
||||
to move to the next state with a single lookup in the matrix.</p>
|
||||
|
||||
<p>This is as fast as it gets, but it is guaranteed to use a lot of memory.
|
||||
Namely, it will use at least <code>4 * 256 * #states</code>, where the number of
|
||||
states is capped at length of all patterns concatenated.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl<P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>> <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a><P></code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a><T: <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a>>(ac: <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a><P, T>) -> <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a><P></code></h4>
|
||||
<div class='docblock'><p>Build a new expanded Aho-Corasick automaton from an existing
|
||||
Aho-Corasick automaton.</p>
|
||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>> <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> for <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a><P></code></h3><div class='impl-items'><h4 id='method.next_state' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.next_state' class='fnname'>next_state</a>(&self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a></code></h4>
|
||||
<h4 id='method.get_match' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.get_match' class='fnname'>get_match</a>(&self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, texti: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h4>
|
||||
<h4 id='method.has_match' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.has_match' class='fnname'>has_match</a>(&self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.start_bytes' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.start_bytes' class='fnname'>start_bytes</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code></h4>
|
||||
<h4 id='method.patterns' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.patterns' class='fnname'>patterns</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a>P<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code></h4>
|
||||
<h4 id='method.pattern' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.pattern' class='fnname'>pattern</a>(&self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> &P</code></h4>
|
||||
<h4 id='method.len' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.len' class='fnname'>len</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
<h4 id='method.is_empty' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.find' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.find' class='fnname'>find</a><'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>>(&'a self, s: &'s Q) -> <a class='struct' href='../aho_corasick/struct.Matches.html' title='aho_corasick::Matches'>Matches</a><'a, 's, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
|
||||
<h4 id='method.find_overlapping' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.find_overlapping' class='fnname'>find_overlapping</a><'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>>(&'a self, s: &'s Q) -> <a class='struct' href='../aho_corasick/struct.MatchesOverlapping.html' title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a><'a, 's, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
|
||||
<h4 id='method.stream_find' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.stream_find' class='fnname'>stream_find</a><'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>>(&'a self, rdr: R) -> <a class='struct' href='../aho_corasick/struct.StreamMatches.html' title='aho_corasick::StreamMatches'>StreamMatches</a><'a, R, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
|
||||
<h4 id='method.stream_find_overlapping' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.stream_find_overlapping' class='fnname'>stream_find_overlapping</a><'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>>(&'a self, rdr: R) -> <a class='struct' href='../aho_corasick/struct.StreamMatchesOverlapping.html' title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a><'a, R, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
|
||||
</div><h3 class='impl'><code>impl<P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a><P></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl<P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a><P></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a><P></code></h4>
|
||||
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,136 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Match` struct in crate `aho_corasick`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Match">
|
||||
|
||||
<title>aho_corasick::Match - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'Match', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>Match</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-89' class='srclink' href='../src/aho_corasick/autiter.rs.html.html#140-153' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Match {
|
||||
pub pati: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>,
|
||||
pub start: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>,
|
||||
pub end: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>,
|
||||
}</pre><div class='docblock'><p>Records a match in the search text.</p>
|
||||
</div><h2 class='fields'>Fields</h2>
|
||||
<table><tr class='stab '>
|
||||
<td id='structfield.pati'><code>pati</code></td><td><div class='docblock'><p>The pattern index.</p>
|
||||
|
||||
<p>This corresponds to the ordering in which the matched pattern was
|
||||
added to the automaton, starting at <code>0</code>.</p>
|
||||
</div></td></tr><tr class='stab '>
|
||||
<td id='structfield.start'><code>start</code></td><td><div class='docblock'><p>The starting byte offset of the match in the search text.</p>
|
||||
</div></td></tr><tr class='stab '>
|
||||
<td id='structfield.end'><code>end</code></td><td><div class='docblock'><p>The ending byte offset of the match in the search text.</p>
|
||||
|
||||
<p>(This can be re-captiulated with <code>pati</code> and adding the pattern's
|
||||
length to <code>start</code>, but it is convenient to have it here.)</p>
|
||||
</div></td></tr></table><h2 id='implementations'>Trait Implementations</h2><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> for <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='impl-items'></div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> for <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='impl-items'><h4 id='method.hash' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash' class='fnname'>hash</a><__H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a>>(&self, __arg_0: &mut __H)</code></h4>
|
||||
<h4 id='method.hash_slice' class='method'><span class="since">1.3.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a><H>(data: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[Self]</a>, state: &mut H) <span class='where'>where H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a></span></code></h4>
|
||||
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h4>
|
||||
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code></h4>
|
||||
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='impl-items'></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Matches` struct in crate `aho_corasick`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Matches">
|
||||
|
||||
<title>aho_corasick::Matches - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'Matches', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>Matches</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-141' class='srclink' href='../src/aho_corasick/autiter.rs.html.html#162-168' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Matches<'a, 's, P, A: 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>An iterator of non-overlapping matches for in-memory text.</p>
|
||||
|
||||
<p>This iterator yields <code>Match</code> values.</p>
|
||||
|
||||
<p><code>'a</code> is the lifetime of the automaton, <code>'s</code> is the lifetime of the
|
||||
search text, and <code>P</code> is the type of the Automaton's pattern.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<'a, 's, P, A: <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../aho_corasick/struct.Matches.html' title='aho_corasick::Matches'>Matches</a><'a, 's, P, A></code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h4>
|
||||
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&mut self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>></code></h4>
|
||||
<h4 id='method.size_hint' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
|
||||
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
|
||||
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a><Self></code></h4>
|
||||
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a><Self></code></h4>
|
||||
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a><Self></code></h4>
|
||||
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a><Self></code></h4>
|
||||
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a><St, B, F>(self, initial_state: St, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a><Self, St, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a><U, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a><Self, U, F> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> U</span></code></h4>
|
||||
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a><Self></code></h4>
|
||||
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
|
||||
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code></h4>
|
||||
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a><B>(self) -> B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a><B, F>(self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a><B, F>(self, init: B, f: F) -> B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a>, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
|
||||
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a><A, B, FromA, FromB>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><B>, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><A>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>></span></code></h4>
|
||||
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a><'a, T>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=&'a T>, T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
|
||||
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
|
||||
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a><S>(self) -> S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
|
||||
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a><P>(self) -> P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
|
||||
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl<'a, 's, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, A: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> + 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../aho_corasick/struct.Matches.html' title='aho_corasick::Matches'>Matches</a><'a, 's, P, A></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `MatchesOverlapping` struct in crate `aho_corasick`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, MatchesOverlapping">
|
||||
|
||||
<title>aho_corasick::MatchesOverlapping - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'MatchesOverlapping', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>MatchesOverlapping</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-276' class='srclink' href='../src/aho_corasick/autiter.rs.html.html#357-364' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct MatchesOverlapping<'a, 's, P, A: 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>An iterator of overlapping matches for in-memory text.</p>
|
||||
|
||||
<p>This iterator yields <code>Match</code> values.</p>
|
||||
|
||||
<p><code>'a</code> is the lifetime of the automaton, <code>'s</code> is the lifetime of the
|
||||
search text, and <code>P</code> is the type of the Automaton's pattern.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<'a, 's, P, A: <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../aho_corasick/struct.MatchesOverlapping.html' title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a><'a, 's, P, A></code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h4>
|
||||
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&mut self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>></code></h4>
|
||||
<h4 id='method.size_hint' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
|
||||
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
|
||||
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a><Self></code></h4>
|
||||
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a><Self></code></h4>
|
||||
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a><Self></code></h4>
|
||||
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a><Self></code></h4>
|
||||
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a><St, B, F>(self, initial_state: St, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a><Self, St, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a><U, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a><Self, U, F> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> U</span></code></h4>
|
||||
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a><Self></code></h4>
|
||||
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
|
||||
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code></h4>
|
||||
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a><B>(self) -> B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a><B, F>(self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a><B, F>(self, init: B, f: F) -> B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a>, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
|
||||
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a><A, B, FromA, FromB>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><B>, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><A>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>></span></code></h4>
|
||||
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a><'a, T>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=&'a T>, T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
|
||||
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
|
||||
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a><S>(self) -> S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
|
||||
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a><P>(self) -> P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
|
||||
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl<'a, 's, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, A: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> + 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../aho_corasick/struct.MatchesOverlapping.html' title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a><'a, 's, P, A></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,122 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Sparse` struct in crate `aho_corasick`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Sparse">
|
||||
|
||||
<title>aho_corasick::Sparse - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'Sparse', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>Sparse</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-684' class='srclink' href='../src/aho_corasick/lib.rs.html.html#469' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Sparse(_);</pre><div class='docblock'><p>State transitions that are always sparse.</p>
|
||||
|
||||
<p>This can use enormous amounts of memory when there are many patterns,
|
||||
but matching is very fast.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a> for <a class='struct' href='../aho_corasick/struct.Sparse.html' title='aho_corasick::Sparse'>Sparse</a></code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.new' class='fnname'>new</a>(_: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>) -> <a class='struct' href='../aho_corasick/struct.Sparse.html' title='aho_corasick::Sparse'>Sparse</a></code></h4>
|
||||
<h4 id='method.goto' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.goto' class='fnname'>goto</a>(&self, b: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a></code></h4>
|
||||
<h4 id='method.set_goto' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.set_goto' class='fnname'>set_goto</a>(&mut self, b: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>)</code></h4>
|
||||
<h4 id='method.heap_bytes' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.heap_bytes' class='fnname'>heap_bytes</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../aho_corasick/struct.Sparse.html' title='aho_corasick::Sparse'>Sparse</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../aho_corasick/struct.Sparse.html' title='aho_corasick::Sparse'>Sparse</a></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../aho_corasick/struct.Sparse.html' title='aho_corasick::Sparse'>Sparse</a></code></h4>
|
||||
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `StreamMatches` struct in crate `aho_corasick`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, StreamMatches">
|
||||
|
||||
<title>aho_corasick::StreamMatches - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'StreamMatches', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>StreamMatches</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-234' class='srclink' href='../src/aho_corasick/autiter.rs.html.html#310-316' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct StreamMatches<'a, R, P, A: 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>An iterator of non-overlapping matches for streaming text.</p>
|
||||
|
||||
<p>This iterator yields <code>io::Result<Match></code> values.</p>
|
||||
|
||||
<p><code>'a</code> is the lifetime of the automaton, <code>R</code> is the type of the underlying
|
||||
<code>io::Read</code>er, and P is the type of the Automaton's pattern.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>, P, A: <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../aho_corasick/struct.StreamMatches.html' title='aho_corasick::StreamMatches'>StreamMatches</a><'a, R, P, A></code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>></code></h4>
|
||||
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&mut self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>>></code></h4>
|
||||
<h4 id='method.size_hint' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
|
||||
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
|
||||
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a><Self></code></h4>
|
||||
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a><Self></code></h4>
|
||||
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a><Self></code></h4>
|
||||
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a><Self></code></h4>
|
||||
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a><St, B, F>(self, initial_state: St, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a><Self, St, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a><U, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a><Self, U, F> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> U</span></code></h4>
|
||||
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a><Self></code></h4>
|
||||
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
|
||||
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code></h4>
|
||||
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a><B>(self) -> B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a><B, F>(self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a><B, F>(self, init: B, f: F) -> B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a>, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
|
||||
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a><A, B, FromA, FromB>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><B>, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><A>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>></span></code></h4>
|
||||
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a><'a, T>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=&'a T>, T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
|
||||
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
|
||||
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a><S>(self) -> S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
|
||||
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a><P>(self) -> P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
|
||||
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl<'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, A: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> + 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../aho_corasick/struct.StreamMatches.html' title='aho_corasick::StreamMatches'>StreamMatches</a><'a, R, P, A></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `StreamMatchesOverlapping` struct in crate `aho_corasick`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, StreamMatchesOverlapping">
|
||||
|
||||
<title>aho_corasick::StreamMatchesOverlapping - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'StreamMatchesOverlapping', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>StreamMatchesOverlapping</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-323' class='srclink' href='../src/aho_corasick/autiter.rs.html.html#424-431' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct StreamMatchesOverlapping<'a, R, P, A: 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>An iterator of overlapping matches for streaming text.</p>
|
||||
|
||||
<p>This iterator yields <code>io::Result<Match></code> values.</p>
|
||||
|
||||
<p><code>'a</code> is the lifetime of the automaton, <code>R</code> is the type of the underlying
|
||||
<code>io::Read</code>er, and P is the type of the Automaton's pattern.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>, P, A: <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../aho_corasick/struct.StreamMatchesOverlapping.html' title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a><'a, R, P, A></code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>></code></h4>
|
||||
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&mut self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>>></code></h4>
|
||||
<h4 id='method.size_hint' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
|
||||
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
|
||||
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a><Self></code></h4>
|
||||
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a><Self></code></h4>
|
||||
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a><Self></code></h4>
|
||||
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a><Self></code></h4>
|
||||
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a><St, B, F>(self, initial_state: St, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a><Self, St, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a><U, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a><Self, U, F> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> U</span></code></h4>
|
||||
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a><Self></code></h4>
|
||||
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
|
||||
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code></h4>
|
||||
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a><B>(self) -> B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a><B, F>(self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a><B, F>(self, init: B, f: F) -> B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a>, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
|
||||
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a><A, B, FromA, FromB>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><B>, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><A>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>></span></code></h4>
|
||||
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a><'a, T>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=&'a T>, T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
|
||||
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
|
||||
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a><S>(self) -> S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
|
||||
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a><P>(self) -> P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
|
||||
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl<'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, A: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> + 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../aho_corasick/struct.StreamMatchesOverlapping.html' title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a><'a, R, P, A></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,160 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Automaton` trait in crate `aho_corasick`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Automaton">
|
||||
|
||||
<title>aho_corasick::Automaton - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'Automaton', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content trait">
|
||||
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>aho_corasick</a>::<wbr><a class='trait' href=''>Automaton</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-17' class='srclink' href='../src/aho_corasick/autiter.rs.html.html#11-109' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust trait'>pub trait Automaton<P> {
|
||||
fn <a href='#tymethod.next_state' class='fnname'>next_state</a>(&self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, b: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>;
|
||||
fn <a href='#tymethod.has_match' class='fnname'>has_match</a>(&self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>;
|
||||
fn <a href='#tymethod.get_match' class='fnname'>get_match</a>(&self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, texti: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>;
|
||||
fn <a href='#tymethod.start_bytes' class='fnname'>start_bytes</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>;
|
||||
fn <a href='#tymethod.patterns' class='fnname'>patterns</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a>P<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>;
|
||||
fn <a href='#tymethod.pattern' class='fnname'>pattern</a>(&self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> &P;
|
||||
|
||||
fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a> { ... }
|
||||
fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> { ... }
|
||||
fn <a href='#method.find' class='fnname'>find</a><'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>>(&'a self, s: &'s Q) -> <a class='struct' href='../aho_corasick/struct.Matches.html' title='aho_corasick::Matches'>Matches</a><'a, 's, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span> { ... }
|
||||
fn <a href='#method.find_overlapping' class='fnname'>find_overlapping</a><'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>>(&'a self, s: &'s Q) -> <a class='struct' href='../aho_corasick/struct.MatchesOverlapping.html' title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a><'a, 's, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span> { ... }
|
||||
fn <a href='#method.stream_find' class='fnname'>stream_find</a><'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>>(&'a self, rdr: R) -> <a class='struct' href='../aho_corasick/struct.StreamMatches.html' title='aho_corasick::StreamMatches'>StreamMatches</a><'a, R, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span> { ... }
|
||||
fn <a href='#method.stream_find_overlapping' class='fnname'>stream_find_overlapping</a><'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>>(&'a self, rdr: R) -> <a class='struct' href='../aho_corasick/struct.StreamMatchesOverlapping.html' title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a><'a, R, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span> { ... }
|
||||
}</pre><div class='docblock'><p>An abstraction over automatons and their corresponding iterators.
|
||||
The type parameter <code>P</code> is the type of the pattern that was used to
|
||||
construct this Automaton.</p>
|
||||
</div>
|
||||
<h2 id='required-methods'>Required Methods</h2>
|
||||
<div class='methods'>
|
||||
<h3 id='tymethod.next_state' class='method stab '><code>fn <a href='#tymethod.next_state' class='fnname'>next_state</a>(&self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, b: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a></code></h3><div class='docblock'><p>Return the next state given the current state and next character.</p>
|
||||
</div><h3 id='tymethod.has_match' class='method stab '><code>fn <a href='#tymethod.has_match' class='fnname'>has_match</a>(&self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h3><div class='docblock'><p>Return true if and only if the given state and current pattern index
|
||||
indicate a match.</p>
|
||||
</div><h3 id='tymethod.get_match' class='method stab '><code>fn <a href='#tymethod.get_match' class='fnname'>get_match</a>(&self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, texti: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='docblock'><p>Build a match given the current state, pattern index and input index.</p>
|
||||
</div><h3 id='tymethod.start_bytes' class='method stab '><code>fn <a href='#tymethod.start_bytes' class='fnname'>start_bytes</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code></h3><div class='docblock'><p>Return the set of bytes that have transitions in the root state.</p>
|
||||
</div><h3 id='tymethod.patterns' class='method stab '><code>fn <a href='#tymethod.patterns' class='fnname'>patterns</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a>P<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code></h3><div class='docblock'><p>Returns all of the patterns matched by this automaton.</p>
|
||||
|
||||
<p>The order of the patterns is the order in which they were added.</p>
|
||||
</div><h3 id='tymethod.pattern' class='method stab '><code>fn <a href='#tymethod.pattern' class='fnname'>pattern</a>(&self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> &P</code></h3><div class='docblock'><p>Returns the pattern indexed at <code>i</code>.</p>
|
||||
|
||||
<p>The index corresponds to the position at which the pattern was added
|
||||
to the automaton, starting at <code>0</code>.</p>
|
||||
</div></div>
|
||||
<h2 id='provided-methods'>Provided Methods</h2>
|
||||
<div class='methods'>
|
||||
<h3 id='method.len' class='method stab '><code>fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h3><div class='docblock'><p>Return the number of patterns in the automaton.</p>
|
||||
</div><h3 id='method.is_empty' class='method stab '><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h3><div class='docblock'><p>Returns true if the automaton has no patterns.</p>
|
||||
</div><h3 id='method.find' class='method stab '><code>fn <a href='#method.find' class='fnname'>find</a><'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>>(&'a self, s: &'s Q) -> <a class='struct' href='../aho_corasick/struct.Matches.html' title='aho_corasick::Matches'>Matches</a><'a, 's, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h3><div class='docblock'><p>Returns an iterator of non-overlapping matches in <code>s</code>.</p>
|
||||
</div><h3 id='method.find_overlapping' class='method stab '><code>fn <a href='#method.find_overlapping' class='fnname'>find_overlapping</a><'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>>(&'a self, s: &'s Q) -> <a class='struct' href='../aho_corasick/struct.MatchesOverlapping.html' title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a><'a, 's, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h3><div class='docblock'><p>Returns an iterator of overlapping matches in <code>s</code>.</p>
|
||||
</div><h3 id='method.stream_find' class='method stab '><code>fn <a href='#method.stream_find' class='fnname'>stream_find</a><'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>>(&'a self, rdr: R) -> <a class='struct' href='../aho_corasick/struct.StreamMatches.html' title='aho_corasick::StreamMatches'>StreamMatches</a><'a, R, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h3><div class='docblock'><p>Returns an iterator of non-overlapping matches in the given reader.</p>
|
||||
</div><h3 id='method.stream_find_overlapping' class='method stab '><code>fn <a href='#method.stream_find_overlapping' class='fnname'>stream_find_overlapping</a><'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>>(&'a self, rdr: R) -> <a class='struct' href='../aho_corasick/struct.StreamMatchesOverlapping.html' title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a><'a, R, P, Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h3><div class='docblock'><p>Returns an iterator of overlapping matches in the given reader.</p>
|
||||
</div></div>
|
||||
<h2 id='implementors'>Implementors</h2>
|
||||
<ul class='item-list' id='implementors-list'>
|
||||
<li><code>impl<'a, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>, A: 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>> <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> for &'a A</code></li>
|
||||
<li><code>impl<P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>> <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> for <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a><P></code></li>
|
||||
<li><code>impl<P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>>, T: <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a>> <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a><P> for <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a><P, T></code></li>
|
||||
</ul><script type="text/javascript" async
|
||||
src="../implementors/aho_corasick/trait.Automaton.js">
|
||||
</script></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,137 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Transitions` trait in crate `aho_corasick`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Transitions">
|
||||
|
||||
<title>aho_corasick::Transitions - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'Transitions', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content trait">
|
||||
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>aho_corasick</a>::<wbr><a class='trait' href=''>Transitions</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-619' class='srclink' href='../src/aho_corasick/lib.rs.html.html#403-412' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust trait'>pub trait Transitions {
|
||||
fn <a href='#tymethod.new' class='fnname'>new</a>(depth: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>) -> Self;
|
||||
fn <a href='#tymethod.goto' class='fnname'>goto</a>(&self, alpha: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>;
|
||||
fn <a href='#tymethod.set_goto' class='fnname'>set_goto</a>(&mut self, alpha: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>);
|
||||
fn <a href='#tymethod.heap_bytes' class='fnname'>heap_bytes</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>;
|
||||
}</pre><div class='docblock'><p>An abstraction over state transition strategies.</p>
|
||||
|
||||
<p>This is an attempt to let the caller choose the space/time trade offs
|
||||
used for state transitions.</p>
|
||||
|
||||
<p>(It's possible that this interface is merely good enough for just the two
|
||||
implementations in this crate.)</p>
|
||||
</div>
|
||||
<h2 id='required-methods'>Required Methods</h2>
|
||||
<div class='methods'>
|
||||
<h3 id='tymethod.new' class='method stab '><code>fn <a href='#tymethod.new' class='fnname'>new</a>(depth: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>) -> Self</code></h3><div class='docblock'><p>Return a new state at the given depth.</p>
|
||||
</div><h3 id='tymethod.goto' class='method stab '><code>fn <a href='#tymethod.goto' class='fnname'>goto</a>(&self, alpha: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a></code></h3><div class='docblock'><p>Return the next state index given the next character.</p>
|
||||
</div><h3 id='tymethod.set_goto' class='method stab '><code>fn <a href='#tymethod.set_goto' class='fnname'>set_goto</a>(&mut self, alpha: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>)</code></h3><div class='docblock'><p>Set the next state index for the character given.</p>
|
||||
</div><h3 id='tymethod.heap_bytes' class='method stab '><code>fn <a href='#tymethod.heap_bytes' class='fnname'>heap_bytes</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h3><div class='docblock'><p>The memory use in bytes (on the heap) of this set of transitions.</p>
|
||||
</div></div>
|
||||
<h2 id='implementors'>Implementors</h2>
|
||||
<ul class='item-list' id='implementors-list'>
|
||||
<li><code>impl <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a> for <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a></code></li>
|
||||
<li><code>impl <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a> for <a class='struct' href='../aho_corasick/struct.Sparse.html' title='aho_corasick::Sparse'>Sparse</a></code></li>
|
||||
</ul><script type="text/javascript" async
|
||||
src="../implementors/aho_corasick/trait.Transitions.js">
|
||||
</script></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,115 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `StateIdx` type in crate `aho_corasick`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, StateIdx">
|
||||
|
||||
<title>aho_corasick::StateIdx - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'StateIdx', ty: 'type', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content type">
|
||||
<h1 class='fqn'><span class='in-band'><a href='index.html'>aho_corasick</a>::<wbr><a class='type' href=''>StateIdx</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-476' class='srclink' href='../src/aho_corasick/lib.rs.html.html#150' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust typedef'>type StateIdx = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>;</pre><div class='docblock'><p>The integer type used for the state index.</p>
|
||||
|
||||
<p>Limiting this to 32 bit integers can have a big impact on memory usage
|
||||
when using the <code>Sparse</code> transition representation.</p>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "aho_corasick";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,184 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Colour` enum in crate `ansi_term`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Colour">
|
||||
|
||||
<title>ansi_term::Colour - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>ansi_term</a></p><script>window.sidebarCurrent = {name: 'Colour', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>ansi_term</a>::<wbr><a class='enum' href=''>Colour</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-65' class='srclink' href='../src/ansi_term/lib.rs.html.html#212-260' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum Colour {
|
||||
Black,
|
||||
Red,
|
||||
Green,
|
||||
Yellow,
|
||||
Blue,
|
||||
Purple,
|
||||
Cyan,
|
||||
White,
|
||||
Fixed(<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>),
|
||||
}</pre><div class='docblock'><p>A colour is one specific type of ANSI escape code, and can refer
|
||||
to either the foreground or background colour.</p>
|
||||
|
||||
<p>These use the standard numeric sequences.
|
||||
See <a href="http://invisible-island.net/xterm/ctlseqs/ctlseqs.html">http://invisible-island.net/xterm/ctlseqs/ctlseqs.html</a></p>
|
||||
</div><h2 class='variants'>Variants</h2>
|
||||
<table class='variants_table'><tr><td id='variant.Black'><code>Black</code></td><td><div class='docblock'><p>Colour #0 (foreground code <code>30</code>, background code <code>40</code>).</p>
|
||||
|
||||
<p>This is not necessarily the background colour, and using it as one may
|
||||
render the text hard to read on terminals with dark backgrounds.</p>
|
||||
</div></td><td></td></tr><tr><td id='variant.Red'><code>Red</code></td><td><div class='docblock'><p>Colour #1 (foreground code <code>31</code>, background code <code>41</code>).</p>
|
||||
</div></td><td></td></tr><tr><td id='variant.Green'><code>Green</code></td><td><div class='docblock'><p>Colour #2 (foreground code <code>32</code>, background code <code>42</code>).</p>
|
||||
</div></td><td></td></tr><tr><td id='variant.Yellow'><code>Yellow</code></td><td><div class='docblock'><p>Colour #3 (foreground code <code>33</code>, background code <code>43</code>).</p>
|
||||
</div></td><td></td></tr><tr><td id='variant.Blue'><code>Blue</code></td><td><div class='docblock'><p>Colour #4 (foreground code <code>34</code>, background code <code>44</code>).</p>
|
||||
</div></td><td></td></tr><tr><td id='variant.Purple'><code>Purple</code></td><td><div class='docblock'><p>Colour #5 (foreground code <code>35</code>, background code <code>45</code>).</p>
|
||||
</div></td><td></td></tr><tr><td id='variant.Cyan'><code>Cyan</code></td><td><div class='docblock'><p>Colour #6 (foreground code <code>36</code>, background code <code>46</code>).</p>
|
||||
</div></td><td></td></tr><tr><td id='variant.White'><code>White</code></td><td><div class='docblock'><p>Colour #7 (foreground code <code>37</code>, background code <code>47</code>).</p>
|
||||
|
||||
<p>As above, this is not necessarily the foreground colour, and may be
|
||||
hard to read on terminals with light backgrounds.</p>
|
||||
</div></td><td></td></tr><tr><td id='variant.Fixed'><code>Fixed</code></td><td><div class='docblock'><p>A colour number from 0 to 255, for use in 256-colour terminal
|
||||
environments.</p>
|
||||
|
||||
<ul>
|
||||
<li>Colours 0 to 7 are the <code>Black</code> to <code>White</code> variants respectively.
|
||||
These colours can usually be changed in the terminal emulator.</li>
|
||||
<li>Colours 8 to 15 are brighter versions of the eight colours above.
|
||||
These can also usually be changed in the terminal emulator, or it
|
||||
could be configured to use the original colours and show the text in
|
||||
bold instead. It varies depending on the program.</li>
|
||||
<li>Colours 16 to 231 contain several palettes of bright colours,
|
||||
arranged in six squares measuring six by six each.</li>
|
||||
<li>Colours 232 to 255 are shades of grey from black to white.</li>
|
||||
</ul>
|
||||
|
||||
<p>It might make more sense to look at a <a href="%5Ecc">colour chart</a>.</p>
|
||||
</div></td><td></td></tr></table><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a></code></h3><div class='impl-items'><h4 id='method.normal' class='method'><code>fn <a href='#method.normal' class='fnname'>normal</a>(self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Return a Style with the foreground colour set to this colour.</p>
|
||||
</div><h4 id='method.paint' class='method'><code>fn <a href='#method.paint' class='fnname'>paint</a><'a, S>(self, input: S) -> <a class='struct' href='../ansi_term/struct.ANSIString.html' title='ansi_term::ANSIString'>ANSIString</a><'a> <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a><<a class='enum' href='https://doc.rust-lang.org/nightly/collections/borrow/enum.Cow.html' title='collections::borrow::Cow'>Cow</a><'a, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>>></span></code></h4>
|
||||
<div class='docblock'><p>Paints the given text with this colour, returning an ANSI string.
|
||||
This is a short-cut so you don't have to use Blue.normal() just
|
||||
to get blue text.</p>
|
||||
</div><h4 id='method.bold' class='method'><code>fn <a href='#method.bold' class='fnname'>bold</a>(self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the bold property set.</p>
|
||||
</div><h4 id='method.dimmed' class='method'><code>fn <a href='#method.dimmed' class='fnname'>dimmed</a>(self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the dimmed property set.</p>
|
||||
</div><h4 id='method.italic' class='method'><code>fn <a href='#method.italic' class='fnname'>italic</a>(self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the italic property set.</p>
|
||||
</div><h4 id='method.underline' class='method'><code>fn <a href='#method.underline' class='fnname'>underline</a>(self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the underline property set.</p>
|
||||
</div><h4 id='method.blink' class='method'><code>fn <a href='#method.blink' class='fnname'>blink</a>(self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the blink property set.</p>
|
||||
</div><h4 id='method.reverse' class='method'><code>fn <a href='#method.reverse' class='fnname'>reverse</a>(self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the reverse property set.</p>
|
||||
</div><h4 id='method.hidden' class='method'><code>fn <a href='#method.hidden' class='fnname'>hidden</a>(self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the hidden property set.</p>
|
||||
</div><h4 id='method.on' class='method'><code>fn <a href='#method.on' class='fnname'>on</a>(self, background: <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a>) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the background colour property set.</p>
|
||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a></code></h3><div class='impl-items'></div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&self) -> <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a></code></h4>
|
||||
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code></h4>
|
||||
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "ansi_term";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,277 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `ansi_term` crate.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, ansi_term">
|
||||
|
||||
<title>ansi_term - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'></p><script>window.sidebarCurrent = {name: 'ansi_term', ty: 'mod', relpath: '../'};</script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>ansi_term</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-0' class='srclink' href='../src/ansi_term/lib.rs.html.html#1-823' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>This is a library for controlling colours and formatting, such as
|
||||
red bold text or blue underlined text, on ANSI terminals.</p>
|
||||
|
||||
<h2 id='basic-usage' class='section-header'><a href='#basic-usage'>Basic usage</a></h2>
|
||||
<p>There are two main data structures in this crate that you need to be
|
||||
concerned with: <code>ANSIString</code> and <code>Style</code>. A <code>Style</code> holds stylistic
|
||||
information: colours, whether the text should be bold, or blinking, or
|
||||
whatever. There are also <code>Colour</code> variants that represent simple foreground
|
||||
colour styles. An <code>ANSIString</code> is a string paired with a <code>Style</code>.</p>
|
||||
|
||||
<p>(Yes, it’s British English, but you won’t have to write “colour” very often.
|
||||
<code>Style</code> is used the majority of the time.)</p>
|
||||
|
||||
<p>To format a string, call the <code>paint</code> method on a <code>Style</code> or a <code>Colour</code>,
|
||||
passing in the string you want to format as the argument. For example,
|
||||
here’s how to get some red text:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Colour</span>::<span class='ident'>Red</span>;
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"This is in red: {}"</span>, <span class='ident'>Red</span>.<span class='ident'>paint</span>(<span class='string'>"a red string"</span>));</pre>
|
||||
|
||||
<p>It’s important to note that the <code>paint</code> method does <em>not</em> actually return a
|
||||
string with the ANSI control characters surrounding it. Instead, it returns
|
||||
an <code>ANSIString</code> value that has a <code>Display</code> implementation that, when
|
||||
formatted, returns the characters. This allows strings to be printed with a
|
||||
minimum of <code>String</code> allocations being performed behind the scenes.</p>
|
||||
|
||||
<p>If you <em>do</em> want to get at the escape codes, then you can convert the
|
||||
<code>ANSIString</code> to a string as you would any other <code>Display</code> value:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Colour</span>::<span class='ident'>Red</span>;
|
||||
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>string</span>::<span class='ident'>ToString</span>;
|
||||
<span class='kw'>let</span> <span class='ident'>red_string</span> <span class='op'>=</span> <span class='ident'>Red</span>.<span class='ident'>paint</span>(<span class='string'>"a red string"</span>).<span class='ident'>to_string</span>();</pre>
|
||||
|
||||
<h2 id='bold-underline-background-and-other-styles' class='section-header'><a href='#bold-underline-background-and-other-styles'>Bold, underline, background, and other styles</a></h2>
|
||||
<p>For anything more complex than plain foreground colour changes, you need to
|
||||
construct <code>Style</code> objects themselves, rather than beginning with a <code>Colour</code>.
|
||||
You can do this by chaining methods based on a new <code>Style</code>, created with
|
||||
<code>Style::new()</code>. Each method creates a new style that has that specific
|
||||
property set. For example:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Style</span>;
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"How about some {} and {}?"</span>,
|
||||
<span class='ident'>Style</span>::<span class='ident'>new</span>().<span class='ident'>bold</span>().<span class='ident'>paint</span>(<span class='string'>"bold"</span>),
|
||||
<span class='ident'>Style</span>::<span class='ident'>new</span>().<span class='ident'>underline</span>().<span class='ident'>paint</span>(<span class='string'>"underline"</span>));</pre>
|
||||
|
||||
<p>For brevity, these methods have also been implemented for <code>Colour</code> values,
|
||||
so you can give your styles a foreground colour without having to begin with
|
||||
an empty <code>Style</code> value:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Colour</span>::{<span class='ident'>Blue</span>, <span class='ident'>Yellow</span>};
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"Demonstrating {} and {}!"</span>,
|
||||
<span class='ident'>Blue</span>.<span class='ident'>bold</span>().<span class='ident'>paint</span>(<span class='string'>"blue bold"</span>),
|
||||
<span class='ident'>Yellow</span>.<span class='ident'>underline</span>().<span class='ident'>paint</span>(<span class='string'>"yellow underline"</span>));
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"Yellow on blue: {}"</span>, <span class='ident'>Yellow</span>.<span class='ident'>on</span>(<span class='ident'>Blue</span>).<span class='ident'>paint</span>(<span class='string'>"wow!"</span>));</pre>
|
||||
|
||||
<p>The complete list of styles you can use are: <code>bold</code>, <code>dimmed</code>, <code>italic</code>,
|
||||
<code>underline</code>, <code>blink</code>, <code>reverse</code>, <code>hidden</code>, and <code>on</code> for background colours.</p>
|
||||
|
||||
<p>Finally, you can turn a <code>Colour</code> into a <code>Style</code> with the <code>normal</code> method.
|
||||
This will produce the exact same <code>ANSIString</code> as if you just used the
|
||||
<code>paint</code> method on the <code>Colour</code> directly, but it’s useful in certain cases:
|
||||
for example, you may have a method that returns <code>Styles</code>, and need to
|
||||
represent both the “red bold” and “red, but not bold” styles with values of
|
||||
the same type. The <code>Style</code> struct also has a <code>Default</code> implementation if you
|
||||
want to have a style with <em>nothing</em> set.</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Style</span>;
|
||||
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Colour</span>::<span class='ident'>Red</span>;
|
||||
<span class='ident'>Red</span>.<span class='ident'>normal</span>().<span class='ident'>paint</span>(<span class='string'>"yet another red string"</span>);
|
||||
<span class='ident'>Style</span>::<span class='ident'>default</span>().<span class='ident'>paint</span>(<span class='string'>"a completely regular string"</span>);</pre>
|
||||
|
||||
<h2 id='extended-colours' class='section-header'><a href='#extended-colours'>Extended colours</a></h2>
|
||||
<p>You can access the extended range of 256 colours by using the <code>Fixed</code> colour
|
||||
variant, which takes an argument of the colour number to use. This can be
|
||||
included wherever you would use a <code>Colour</code>:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Colour</span>::<span class='ident'>Fixed</span>;
|
||||
<span class='ident'>Fixed</span>(<span class='number'>134</span>).<span class='ident'>paint</span>(<span class='string'>"A sort of light purple"</span>);
|
||||
<span class='ident'>Fixed</span>(<span class='number'>221</span>).<span class='ident'>on</span>(<span class='ident'>Fixed</span>(<span class='number'>124</span>)).<span class='ident'>paint</span>(<span class='string'>"Mustard in the ketchup"</span>);</pre>
|
||||
|
||||
<p>The first sixteen of these values are the same as the normal and bold
|
||||
standard colour variants. There’s nothing stopping you from using these as
|
||||
<code>Fixed</code> colours instead, but there’s nothing to be gained by doing so
|
||||
either.</p>
|
||||
|
||||
<h2 id='combining-successive-coloured-strings' class='section-header'><a href='#combining-successive-coloured-strings'>Combining successive coloured strings</a></h2>
|
||||
<p>The benefit of writing ANSI escape codes to the terminal is that they
|
||||
<em>stack</em>: you do not need to end every coloured string with a reset code if
|
||||
the text that follows it is of a similar style. For example, if you want to
|
||||
have some blue text followed by some blue bold text, it’s possible to send
|
||||
the ANSI code for blue, followed by the ANSI code for bold, and finishing
|
||||
with a reset code without having to have an extra one between the two
|
||||
strings.</p>
|
||||
|
||||
<p>This crate can optimise the ANSI codes that get printed in situations like
|
||||
this, making life easier for your terminal renderer. The <code>ANSIStrings</code>
|
||||
struct takes a slice of several <code>ANSIString</code> values, and will iterate over
|
||||
each of them, printing only the codes for the styles that need to be updated
|
||||
as part of its formatting routine.</p>
|
||||
|
||||
<p>The following code snippet uses this to enclose a binary number displayed in
|
||||
red bold text inside some red, but not bold, brackets:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Colour</span>::<span class='ident'>Red</span>;
|
||||
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::{<span class='ident'>ANSIString</span>, <span class='ident'>ANSIStrings</span>};
|
||||
<span class='kw'>let</span> <span class='ident'>some_value</span> <span class='op'>=</span> <span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>"{:b}"</span>, <span class='number'>42</span>);
|
||||
<span class='kw'>let</span> <span class='ident'>strings</span>: <span class='kw-2'>&</span>[<span class='ident'>ANSIString</span><span class='op'><</span><span class='lifetime'>'static</span><span class='op'>></span>] <span class='op'>=</span> <span class='kw-2'>&</span>[
|
||||
<span class='ident'>Red</span>.<span class='ident'>paint</span>(<span class='string'>"["</span>),
|
||||
<span class='ident'>Red</span>.<span class='ident'>bold</span>().<span class='ident'>paint</span>(<span class='ident'>some_value</span>),
|
||||
<span class='ident'>Red</span>.<span class='ident'>paint</span>(<span class='string'>"]"</span>),
|
||||
];
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"Value: {}"</span>, <span class='ident'>ANSIStrings</span>(<span class='ident'>strings</span>));</pre>
|
||||
|
||||
<p>There are several things to note here. Firstly, the <code>paint</code> method can take
|
||||
<em>either</em> an owned <code>String</code> or a borrowed <code>&str</code>. Internally, an <code>ANSIString</code>
|
||||
holds a copy-on-write (<code>Cow</code>) string value to deal with both owned and
|
||||
borrowed strings at the same time. This is used here to display a <code>String</code>,
|
||||
the result of the <code>format!</code> call, using the same mechanism as some
|
||||
statically-available <code>&str</code> slices. Secondly, that the <code>ANSIStrings</code> value
|
||||
works in the same way as its singular counterpart, with a <code>Display</code>
|
||||
implementation that only performs the formatting when required.</p>
|
||||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.ANSIString.html'
|
||||
title='ansi_term::ANSIString'>ANSIString</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An ANSI String is a string coupled with the Style to display it
|
||||
in a terminal.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.ANSIStrings.html'
|
||||
title='ansi_term::ANSIStrings'>ANSIStrings</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A set of <code>ANSIString</code>s collected together, in order to be written with a
|
||||
minimum of control characters.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Style.html'
|
||||
title='ansi_term::Style'>Style</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A style is a collection of properties that can format a string
|
||||
using ANSI escape codes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.Colour.html'
|
||||
title='ansi_term::Colour'>Colour</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A colour is one specific type of ANSI escape code, and can refer
|
||||
to either the foreground or background colour.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "ansi_term";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1 +0,0 @@
|
|||
initSidebarItems({"enum":[["Colour","A colour is one specific type of ANSI escape code, and can refer to either the foreground or background colour."]],"struct":[["ANSIString","An ANSI String is a string coupled with the Style to display it in a terminal."],["ANSIStrings","A set of `ANSIString`s collected together, in order to be written with a minimum of control characters."],["Style","A style is a collection of properties that can format a string using ANSI escape codes."]]});
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,114 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `ANSIStrings` struct in crate `ansi_term`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, ANSIStrings">
|
||||
|
||||
<title>ansi_term::ANSIStrings - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>ansi_term</a></p><script>window.sidebarCurrent = {name: 'ANSIStrings', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>ansi_term</a>::<wbr><a class='struct' href=''>ANSIStrings</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-369' class='srclink' href='../src/ansi_term/lib.rs.html.html#637' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct ANSIStrings<'a>(pub <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'a [</a><a class='struct' href='../ansi_term/struct.ANSIString.html' title='ansi_term::ANSIString'>ANSIString</a><'a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>);</pre><div class='docblock'><p>A set of <code>ANSIString</code>s collected together, in order to be written with a
|
||||
minimum of control characters.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<'a> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html' title='core::fmt::Display'>Display</a> for <a class='struct' href='../ansi_term/struct.ANSIStrings.html' title='ansi_term::ANSIStrings'>ANSIStrings</a><'a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#method.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "ansi_term";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Style` struct in crate `ansi_term`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Style">
|
||||
|
||||
<title>ansi_term::Style - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>ansi_term</a></p><script>window.sidebarCurrent = {name: 'Style', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>ansi_term</a>::<wbr><a class='struct' href=''>Style</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-179' class='srclink' href='../src/ansi_term/lib.rs.html.html#357-367' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Style {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>A style is a collection of properties that can format a string
|
||||
using ANSI escape codes.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>() -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Creates a new Style with no differences.</p>
|
||||
</div><h4 id='method.paint' class='method'><code>fn <a href='#method.paint' class='fnname'>paint</a><'a, S>(self, input: S) -> <a class='struct' href='../ansi_term/struct.ANSIString.html' title='ansi_term::ANSIString'>ANSIString</a><'a> <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a><<a class='enum' href='https://doc.rust-lang.org/nightly/collections/borrow/enum.Cow.html' title='collections::borrow::Cow'>Cow</a><'a, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>>></span></code></h4>
|
||||
<div class='docblock'><p>Paints the given text with this colour, returning an ANSI string.</p>
|
||||
</div><h4 id='method.bold' class='method'><code>fn <a href='#method.bold' class='fnname'>bold</a>(&self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the bold property set.</p>
|
||||
</div><h4 id='method.dimmed' class='method'><code>fn <a href='#method.dimmed' class='fnname'>dimmed</a>(&self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the dimmed property set.</p>
|
||||
</div><h4 id='method.italic' class='method'><code>fn <a href='#method.italic' class='fnname'>italic</a>(&self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the italic property set.</p>
|
||||
</div><h4 id='method.underline' class='method'><code>fn <a href='#method.underline' class='fnname'>underline</a>(&self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the underline property set.</p>
|
||||
</div><h4 id='method.blink' class='method'><code>fn <a href='#method.blink' class='fnname'>blink</a>(&self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the blink property set.</p>
|
||||
</div><h4 id='method.reverse' class='method'><code>fn <a href='#method.reverse' class='fnname'>reverse</a>(&self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the reverse property set.</p>
|
||||
</div><h4 id='method.hidden' class='method'><code>fn <a href='#method.hidden' class='fnname'>hidden</a>(&self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the hidden property set.</p>
|
||||
</div><h4 id='method.on' class='method'><code>fn <a href='#method.on' class='fnname'>on</a>(&self, background: <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a>) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<div class='docblock'><p>Returns a Style with the background colour property set.</p>
|
||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> for <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h3><div class='impl-items'><h4 id='method.default' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#method.default' class='fnname'>default</a>() -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h3><div class='impl-items'></div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
|
||||
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code></h4>
|
||||
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "ansi_term";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,203 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `bit_vec` crate.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, bit_vec">
|
||||
|
||||
<title>bit_vec - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'></p><script>window.sidebarCurrent = {name: 'bit_vec', ty: 'mod', relpath: '../'};</script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>bit_vec</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-0' class='srclink' href='../src/bit_vec/lib.rs.html.html#31-2088' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>Collections implemented with bit vectors.</p>
|
||||
|
||||
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
|
||||
<p>This is a simple example of the <a href="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes">Sieve of Eratosthenes</a>
|
||||
which calculates prime numbers up to a given limit.</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>max_prime</span> <span class='op'>=</span> <span class='number'>10000</span>;
|
||||
|
||||
<span class='comment'>// Store the primes as a BitVec</span>
|
||||
<span class='kw'>let</span> <span class='ident'>primes</span> <span class='op'>=</span> {
|
||||
<span class='comment'>// Assume all numbers are prime to begin, and then we</span>
|
||||
<span class='comment'>// cross off non-primes progressively</span>
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='ident'>max_prime</span>, <span class='boolval'>true</span>);
|
||||
|
||||
<span class='comment'>// Neither 0 nor 1 are prime</span>
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>0</span>, <span class='boolval'>false</span>);
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>1</span>, <span class='boolval'>false</span>);
|
||||
|
||||
<span class='kw'>for</span> <span class='ident'>i</span> <span class='kw'>in</span> <span class='number'>2</span>.. <span class='number'>1</span> <span class='op'>+</span> (<span class='ident'>max_prime</span> <span class='kw'>as</span> <span class='ident'>f64</span>).<span class='ident'>sqrt</span>() <span class='kw'>as</span> <span class='ident'>usize</span> {
|
||||
<span class='comment'>// if i is a prime</span>
|
||||
<span class='kw'>if</span> <span class='ident'>bv</span>[<span class='ident'>i</span>] {
|
||||
<span class='comment'>// Mark all multiples of i as non-prime (any multiples below i * i</span>
|
||||
<span class='comment'>// will have been marked as non-prime previously)</span>
|
||||
<span class='kw'>for</span> <span class='ident'>j</span> <span class='kw'>in</span> <span class='ident'>i</span>.. {
|
||||
<span class='kw'>if</span> <span class='ident'>i</span> <span class='op'>*</span> <span class='ident'>j</span> <span class='op'>>=</span> <span class='ident'>max_prime</span> {
|
||||
<span class='kw'>break</span>;
|
||||
}
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='ident'>i</span> <span class='op'>*</span> <span class='ident'>j</span>, <span class='boolval'>false</span>)
|
||||
}
|
||||
}
|
||||
}
|
||||
<span class='ident'>bv</span>
|
||||
};
|
||||
|
||||
<span class='comment'>// Simple primality tests below our max bound</span>
|
||||
<span class='kw'>let</span> <span class='ident'>print_primes</span> <span class='op'>=</span> <span class='number'>20</span>;
|
||||
<span class='macro'>print</span><span class='macro'>!</span>(<span class='string'>"The primes below {} are: "</span>, <span class='ident'>print_primes</span>);
|
||||
<span class='kw'>for</span> <span class='ident'>x</span> <span class='kw'>in</span> <span class='number'>0</span>..<span class='ident'>print_primes</span> {
|
||||
<span class='kw'>if</span> <span class='ident'>primes</span>.<span class='ident'>get</span>(<span class='ident'>x</span>).<span class='ident'>unwrap_or</span>(<span class='boolval'>false</span>) {
|
||||
<span class='macro'>print</span><span class='macro'>!</span>(<span class='string'>"{} "</span>, <span class='ident'>x</span>);
|
||||
}
|
||||
}
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>""</span>);
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>num_primes</span> <span class='op'>=</span> <span class='ident'>primes</span>.<span class='ident'>iter</span>().<span class='ident'>filter</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>x</span>).<span class='ident'>count</span>();
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"There are {} primes below {}"</span>, <span class='ident'>num_primes</span>, <span class='ident'>max_prime</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>num_primes</span>, <span class='number'>1_229</span>);</pre>
|
||||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.BitVec.html'
|
||||
title='bit_vec::BitVec'>BitVec</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>The bitvector type.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Blocks.html'
|
||||
title='bit_vec::Blocks'>Blocks</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An iterator over the blocks of a <code>BitVec</code>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.IntoIter.html'
|
||||
title='bit_vec::IntoIter'>IntoIter</a></td>
|
||||
<td class='docblock short'>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Iter.html'
|
||||
title='bit_vec::Iter'>Iter</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An iterator for <code>BitVec</code>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='trait' href='trait.BitBlock.html'
|
||||
title='bit_vec::BitBlock'>BitBlock</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Abstracts over a pile of bits (basically unsigned primitives)</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "bit_vec";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1 +0,0 @@
|
|||
initSidebarItems({"struct":[["BitVec","The bitvector type."],["Blocks","An iterator over the blocks of a `BitVec`."],["IntoIter",""],["Iter","An iterator for `BitVec`."]],"trait":[["BitBlock","Abstracts over a pile of bits (basically unsigned primitives)"]]});
|
||||
|
|
@ -1,537 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `BitVec` struct in crate `bit_vec`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, BitVec">
|
||||
|
||||
<title>bit_vec::BitVec - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>bit_vec</a></p><script>window.sidebarCurrent = {name: 'BitVec', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>bit_vec</a>::<wbr><a class='struct' href=''>BitVec</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-76' class='srclink' href='../src/bit_vec/lib.rs.html.html#199-204' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct BitVec<B = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>The bitvector type.</p>
|
||||
|
||||
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>10</span>, <span class='boolval'>false</span>);
|
||||
|
||||
<span class='comment'>// insert all primes less than 10</span>
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>2</span>, <span class='boolval'>true</span>);
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>3</span>, <span class='boolval'>true</span>);
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>5</span>, <span class='boolval'>true</span>);
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>7</span>, <span class='boolval'>true</span>);
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>bv</span>);
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"total bits set to true: {}"</span>, <span class='ident'>bv</span>.<span class='ident'>iter</span>().<span class='ident'>filter</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>x</span>).<span class='ident'>count</span>());
|
||||
|
||||
<span class='comment'>// flip all values in bitvector, producing non-primes less than 10</span>
|
||||
<span class='ident'>bv</span>.<span class='ident'>negate</span>();
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>bv</span>);
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"total bits set to true: {}"</span>, <span class='ident'>bv</span>.<span class='ident'>iter</span>().<span class='ident'>filter</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>x</span>).<span class='ident'>count</span>());
|
||||
|
||||
<span class='comment'>// reset bitvector to empty</span>
|
||||
<span class='ident'>bv</span>.<span class='ident'>clear</span>();
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>bv</span>);
|
||||
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>"total bits set to true: {}"</span>, <span class='ident'>bv</span>.<span class='ident'>iter</span>().<span class='ident'>filter</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>x</span>).<span class='ident'>count</span>());</pre>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>></code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>() -> Self</code></h4>
|
||||
<div class='docblock'><p>Creates an empty <code>BitVec</code>.</p>
|
||||
|
||||
<h1 id='examples-1' class='section-header'><a href='#examples-1'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>new</span>();</pre>
|
||||
</div><h4 id='method.from_elem' class='method'><code>fn <a href='#method.from_elem' class='fnname'>from_elem</a>(nbits: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, bit: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>) -> Self</code></h4>
|
||||
<div class='docblock'><p>Creates a <code>BitVec</code> that holds <code>nbits</code> elements, setting each element
|
||||
to <code>bit</code>.</p>
|
||||
|
||||
<h1 id='examples-2' class='section-header'><a href='#examples-2'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>10</span>, <span class='boolval'>false</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>len</span>(), <span class='number'>10</span>);
|
||||
<span class='kw'>for</span> <span class='ident'>x</span> <span class='kw'>in</span> <span class='ident'>bv</span>.<span class='ident'>iter</span>() {
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>x</span>, <span class='boolval'>false</span>);
|
||||
}</pre>
|
||||
</div><h4 id='method.with_capacity' class='method'><code>fn <a href='#method.with_capacity' class='fnname'>with_capacity</a>(nbits: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> Self</code></h4>
|
||||
<div class='docblock'><p>Constructs a new, empty <code>BitVec</code> with the specified capacity.</p>
|
||||
|
||||
<p>The bitvector will be able to hold at least <code>capacity</code> bits without
|
||||
reallocating. If <code>capacity</code> is 0, it will not allocate.</p>
|
||||
|
||||
<p>It is important to note that this function does not specify the
|
||||
<em>length</em> of the returned bitvector, but only the <em>capacity</em>.</p>
|
||||
</div><h4 id='method.from_bytes' class='method'><code>fn <a href='#method.from_bytes' class='fnname'>from_bytes</a>(bytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> Self</code></h4>
|
||||
<div class='docblock'><p>Transforms a byte-vector into a <code>BitVec</code>. Each byte becomes eight bits,
|
||||
with the most significant bits of each byte coming first. Each
|
||||
bit becomes <code>true</code> if equal to 1 or <code>false</code> if equal to 0.</p>
|
||||
|
||||
<h1 id='examples-3' class='section-header'><a href='#examples-3'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='number'>0b10100000</span>, <span class='number'>0b00010010</span>]);
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>eq_vec</span>(<span class='kw-2'>&</span>[<span class='boolval'>true</span>, <span class='boolval'>false</span>, <span class='boolval'>true</span>, <span class='boolval'>false</span>,
|
||||
<span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>false</span>,
|
||||
<span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>true</span>,
|
||||
<span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>true</span>, <span class='boolval'>false</span>]));</pre>
|
||||
</div><h4 id='method.from_fn' class='method'><code>fn <a href='#method.from_fn' class='fnname'>from_fn</a><F>(len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, f: F) -> Self <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<div class='docblock'><p>Creates a <code>BitVec</code> of the specified length where the value at each index
|
||||
is <code>f(index)</code>.</p>
|
||||
|
||||
<h1 id='examples-4' class='section-header'><a href='#examples-4'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_fn</span>(<span class='number'>5</span>, <span class='op'>|</span><span class='ident'>i</span><span class='op'>|</span> { <span class='ident'>i</span> <span class='op'>%</span> <span class='number'>2</span> <span class='op'>==</span> <span class='number'>0</span> });
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>eq_vec</span>(<span class='kw-2'>&</span>[<span class='boolval'>true</span>, <span class='boolval'>false</span>, <span class='boolval'>true</span>, <span class='boolval'>false</span>, <span class='boolval'>true</span>]));</pre>
|
||||
</div></div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='method.blocks' class='method'><code>fn <a href='#method.blocks' class='fnname'>blocks</a>(&self) -> <a class='struct' href='../bit_vec/struct.Blocks.html' title='bit_vec::Blocks'>Blocks</a><B></code></h4>
|
||||
<div class='docblock'><p>Iterator over the underlying blocks of data</p>
|
||||
</div><h4 id='method.storage' class='method'><code>fn <a href='#method.storage' class='fnname'>storage</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a>B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code></h4>
|
||||
<div class='docblock'><p>Exposes the raw block storage of this BitVec</p>
|
||||
|
||||
<p>Only really intended for BitSet.</p>
|
||||
</div><h4 id='method.storage_mut' class='method'><code>unsafe fn <a href='#method.storage_mut' class='fnname'>storage_mut</a>(&mut self) -> &mut <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><B></code></h4>
|
||||
<div class='docblock'><p>Exposes the raw block storage of this BitVec</p>
|
||||
|
||||
<p>Can probably cause unsafety. Only really intended for BitSet.</p>
|
||||
</div><h4 id='method.get' class='method'><code>fn <a href='#method.get' class='fnname'>get</a>(&self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>></code></h4>
|
||||
<div class='docblock'><p>Retrieves the value at index <code>i</code>, or <code>None</code> if the index is out of bounds.</p>
|
||||
|
||||
<h1 id='examples-5' class='section-header'><a href='#examples-5'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='number'>0b01100000</span>]);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>get</span>(<span class='number'>0</span>), <span class='prelude-val'>Some</span>(<span class='boolval'>false</span>));
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>get</span>(<span class='number'>1</span>), <span class='prelude-val'>Some</span>(<span class='boolval'>true</span>));
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>get</span>(<span class='number'>100</span>), <span class='prelude-val'>None</span>);
|
||||
|
||||
<span class='comment'>// Can also use array indexing</span>
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>[<span class='number'>1</span>], <span class='boolval'>true</span>);</pre>
|
||||
</div><h4 id='method.set' class='method'><code>fn <a href='#method.set' class='fnname'>set</a>(&mut self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, x: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>)</code></h4>
|
||||
<div class='docblock'><p>Sets the value of a bit at an index <code>i</code>.</p>
|
||||
|
||||
<h1 id='panics' class='section-header'><a href='#panics'>Panics</a></h1>
|
||||
<p>Panics if <code>i</code> is out of bounds.</p>
|
||||
|
||||
<h1 id='examples-6' class='section-header'><a href='#examples-6'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>5</span>, <span class='boolval'>false</span>);
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>3</span>, <span class='boolval'>true</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>[<span class='number'>3</span>], <span class='boolval'>true</span>);</pre>
|
||||
</div><h4 id='method.set_all' class='method'><code>fn <a href='#method.set_all' class='fnname'>set_all</a>(&mut self)</code></h4>
|
||||
<div class='docblock'><p>Sets all bits to 1.</p>
|
||||
|
||||
<h1 id='examples-7' class='section-header'><a href='#examples-7'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>before</span> <span class='op'>=</span> <span class='number'>0b01100000</span>;
|
||||
<span class='kw'>let</span> <span class='ident'>after</span> <span class='op'>=</span> <span class='number'>0b11111111</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>before</span>]);
|
||||
<span class='ident'>bv</span>.<span class='ident'>set_all</span>();
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>, <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>after</span>]));</pre>
|
||||
</div><h4 id='method.negate' class='method'><code>fn <a href='#method.negate' class='fnname'>negate</a>(&mut self)</code></h4>
|
||||
<div class='docblock'><p>Flips all bits.</p>
|
||||
|
||||
<h1 id='examples-8' class='section-header'><a href='#examples-8'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>before</span> <span class='op'>=</span> <span class='number'>0b01100000</span>;
|
||||
<span class='kw'>let</span> <span class='ident'>after</span> <span class='op'>=</span> <span class='number'>0b10011111</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>before</span>]);
|
||||
<span class='ident'>bv</span>.<span class='ident'>negate</span>();
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>, <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>after</span>]));</pre>
|
||||
</div><h4 id='method.union' class='method'><code>fn <a href='#method.union' class='fnname'>union</a>(&mut self, other: &Self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>Calculates the union of two bitvectors. This acts like the bitwise <code>or</code>
|
||||
function.</p>
|
||||
|
||||
<p>Sets <code>self</code> to the union of <code>self</code> and <code>other</code>. Both bitvectors must be
|
||||
the same length. Returns <code>true</code> if <code>self</code> changed.</p>
|
||||
|
||||
<h1 id='panics-1' class='section-header'><a href='#panics-1'>Panics</a></h1>
|
||||
<p>Panics if the bitvectors are of different lengths.</p>
|
||||
|
||||
<h1 id='examples-9' class='section-header'><a href='#examples-9'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</span> <span class='number'>0b01100100</span>;
|
||||
<span class='kw'>let</span> <span class='ident'>b</span> <span class='op'>=</span> <span class='number'>0b01011010</span>;
|
||||
<span class='kw'>let</span> <span class='ident'>res</span> <span class='op'>=</span> <span class='number'>0b01111110</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>a</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>a</span>]);
|
||||
<span class='kw'>let</span> <span class='ident'>b</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>b</span>]);
|
||||
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>a</span>.<span class='ident'>union</span>(<span class='kw-2'>&</span><span class='ident'>b</span>));
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>, <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>res</span>]));</pre>
|
||||
</div><h4 id='method.intersect' class='method'><code>fn <a href='#method.intersect' class='fnname'>intersect</a>(&mut self, other: &Self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>Calculates the intersection of two bitvectors. This acts like the
|
||||
bitwise <code>and</code> function.</p>
|
||||
|
||||
<p>Sets <code>self</code> to the intersection of <code>self</code> and <code>other</code>. Both bitvectors
|
||||
must be the same length. Returns <code>true</code> if <code>self</code> changed.</p>
|
||||
|
||||
<h1 id='panics-2' class='section-header'><a href='#panics-2'>Panics</a></h1>
|
||||
<p>Panics if the bitvectors are of different lengths.</p>
|
||||
|
||||
<h1 id='examples-10' class='section-header'><a href='#examples-10'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</span> <span class='number'>0b01100100</span>;
|
||||
<span class='kw'>let</span> <span class='ident'>b</span> <span class='op'>=</span> <span class='number'>0b01011010</span>;
|
||||
<span class='kw'>let</span> <span class='ident'>res</span> <span class='op'>=</span> <span class='number'>0b01000000</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>a</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>a</span>]);
|
||||
<span class='kw'>let</span> <span class='ident'>b</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>b</span>]);
|
||||
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>a</span>.<span class='ident'>intersect</span>(<span class='kw-2'>&</span><span class='ident'>b</span>));
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>, <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>res</span>]));</pre>
|
||||
</div><h4 id='method.difference' class='method'><code>fn <a href='#method.difference' class='fnname'>difference</a>(&mut self, other: &Self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>Calculates the difference between two bitvectors.</p>
|
||||
|
||||
<p>Sets each element of <code>self</code> to the value of that element minus the
|
||||
element of <code>other</code> at the same index. Both bitvectors must be the same
|
||||
length. Returns <code>true</code> if <code>self</code> changed.</p>
|
||||
|
||||
<h1 id='panics-3' class='section-header'><a href='#panics-3'>Panics</a></h1>
|
||||
<p>Panics if the bitvectors are of different length.</p>
|
||||
|
||||
<h1 id='examples-11' class='section-header'><a href='#examples-11'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</span> <span class='number'>0b01100100</span>;
|
||||
<span class='kw'>let</span> <span class='ident'>b</span> <span class='op'>=</span> <span class='number'>0b01011010</span>;
|
||||
<span class='kw'>let</span> <span class='ident'>a_b</span> <span class='op'>=</span> <span class='number'>0b00100100</span>; <span class='comment'>// a - b</span>
|
||||
<span class='kw'>let</span> <span class='ident'>b_a</span> <span class='op'>=</span> <span class='number'>0b00011010</span>; <span class='comment'>// b - a</span>
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bva</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>a</span>]);
|
||||
<span class='kw'>let</span> <span class='ident'>bvb</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>b</span>]);
|
||||
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bva</span>.<span class='ident'>difference</span>(<span class='kw-2'>&</span><span class='ident'>bvb</span>));
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bva</span>, <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>a_b</span>]));
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>bva</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>a</span>]);
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bvb</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>b</span>]);
|
||||
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bvb</span>.<span class='ident'>difference</span>(<span class='kw-2'>&</span><span class='ident'>bva</span>));
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bvb</span>, <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='ident'>b_a</span>]));</pre>
|
||||
</div><h4 id='method.all' class='method'><code>fn <a href='#method.all' class='fnname'>all</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>Returns <code>true</code> if all bits are 1.</p>
|
||||
|
||||
<h1 id='examples-12' class='section-header'><a href='#examples-12'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>5</span>, <span class='boolval'>true</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>all</span>(), <span class='boolval'>true</span>);
|
||||
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>1</span>, <span class='boolval'>false</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>all</span>(), <span class='boolval'>false</span>);</pre>
|
||||
</div><h4 id='method.iter' class='method'><code>fn <a href='#method.iter' class='fnname'>iter</a>(&self) -> <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a><B></code></h4>
|
||||
<div class='docblock'><p>Returns an iterator over the elements of the vector in order.</p>
|
||||
|
||||
<h1 id='examples-13' class='section-header'><a href='#examples-13'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='number'>0b01110100</span>, <span class='number'>0b10010010</span>]);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>iter</span>().<span class='ident'>filter</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>x</span>).<span class='ident'>count</span>(), <span class='number'>7</span>);</pre>
|
||||
</div><h4 id='method.none' class='method'><code>fn <a href='#method.none' class='fnname'>none</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>Returns <code>true</code> if all bits are 0.</p>
|
||||
|
||||
<h1 id='examples-14' class='section-header'><a href='#examples-14'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>10</span>, <span class='boolval'>false</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>none</span>(), <span class='boolval'>true</span>);
|
||||
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>3</span>, <span class='boolval'>true</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>none</span>(), <span class='boolval'>false</span>);</pre>
|
||||
</div><h4 id='method.any' class='method'><code>fn <a href='#method.any' class='fnname'>any</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>Returns <code>true</code> if any bit is 1.</p>
|
||||
|
||||
<h1 id='examples-15' class='section-header'><a href='#examples-15'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>10</span>, <span class='boolval'>false</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>any</span>(), <span class='boolval'>false</span>);
|
||||
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>3</span>, <span class='boolval'>true</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>any</span>(), <span class='boolval'>true</span>);</pre>
|
||||
</div><h4 id='method.to_bytes' class='method'><code>fn <a href='#method.to_bytes' class='fnname'>to_bytes</a>(&self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>></code></h4>
|
||||
<div class='docblock'><p>Organises the bits into bytes, such that the first bit in the
|
||||
<code>BitVec</code> becomes the high-order bit of the first byte. If the
|
||||
size of the <code>BitVec</code> is not a multiple of eight then trailing bits
|
||||
will be filled-in with <code>false</code>.</p>
|
||||
|
||||
<h1 id='examples-16' class='section-header'><a href='#examples-16'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>3</span>, <span class='boolval'>true</span>);
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>1</span>, <span class='boolval'>false</span>);
|
||||
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>to_bytes</span>(), [<span class='number'>0b10100000</span>]);
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>9</span>, <span class='boolval'>false</span>);
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>2</span>, <span class='boolval'>true</span>);
|
||||
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>8</span>, <span class='boolval'>true</span>);
|
||||
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>to_bytes</span>(), [<span class='number'>0b00100000</span>, <span class='number'>0b10000000</span>]);</pre>
|
||||
</div><h4 id='method.eq_vec' class='method'><code>fn <a href='#method.eq_vec' class='fnname'>eq_vec</a>(&self, v: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>Compares a <code>BitVec</code> to a slice of <code>bool</code>s.
|
||||
Both the <code>BitVec</code> and slice must have the same length.</p>
|
||||
|
||||
<h1 id='panics-4' class='section-header'><a href='#panics-4'>Panics</a></h1>
|
||||
<p>Panics if the <code>BitVec</code> and slice are of different length.</p>
|
||||
|
||||
<h1 id='examples-17' class='section-header'><a href='#examples-17'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='number'>0b10100000</span>]);
|
||||
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>eq_vec</span>(<span class='kw-2'>&</span>[<span class='boolval'>true</span>, <span class='boolval'>false</span>, <span class='boolval'>true</span>, <span class='boolval'>false</span>,
|
||||
<span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>false</span>]));</pre>
|
||||
</div><h4 id='method.truncate' class='method'><code>fn <a href='#method.truncate' class='fnname'>truncate</a>(&mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
|
||||
<div class='docblock'><p>Shortens a <code>BitVec</code>, dropping excess elements.</p>
|
||||
|
||||
<p>If <code>len</code> is greater than the vector's current length, this has no
|
||||
effect.</p>
|
||||
|
||||
<h1 id='examples-18' class='section-header'><a href='#examples-18'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='number'>0b01001011</span>]);
|
||||
<span class='ident'>bv</span>.<span class='ident'>truncate</span>(<span class='number'>2</span>);
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>eq_vec</span>(<span class='kw-2'>&</span>[<span class='boolval'>false</span>, <span class='boolval'>true</span>]));</pre>
|
||||
</div><h4 id='method.reserve' class='method'><code>fn <a href='#method.reserve' class='fnname'>reserve</a>(&mut self, additional: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
|
||||
<div class='docblock'><p>Reserves capacity for at least <code>additional</code> more bits to be inserted in the given
|
||||
<code>BitVec</code>. The collection may reserve more space to avoid frequent reallocations.</p>
|
||||
|
||||
<h1 id='panics-5' class='section-header'><a href='#panics-5'>Panics</a></h1>
|
||||
<p>Panics if the new capacity overflows <code>usize</code>.</p>
|
||||
|
||||
<h1 id='examples-19' class='section-header'><a href='#examples-19'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>3</span>, <span class='boolval'>false</span>);
|
||||
<span class='ident'>bv</span>.<span class='ident'>reserve</span>(<span class='number'>10</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>capacity</span>() <span class='op'>>=</span> <span class='number'>13</span>);</pre>
|
||||
</div><h4 id='method.reserve_exact' class='method'><code>fn <a href='#method.reserve_exact' class='fnname'>reserve_exact</a>(&mut self, additional: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
|
||||
<div class='docblock'><p>Reserves the minimum capacity for exactly <code>additional</code> more bits to be inserted in the
|
||||
given <code>BitVec</code>. Does nothing if the capacity is already sufficient.</p>
|
||||
|
||||
<p>Note that the allocator may give the collection more space than it requests. Therefore
|
||||
capacity can not be relied upon to be precisely minimal. Prefer <code>reserve</code> if future
|
||||
insertions are expected.</p>
|
||||
|
||||
<h1 id='panics-6' class='section-header'><a href='#panics-6'>Panics</a></h1>
|
||||
<p>Panics if the new capacity overflows <code>usize</code>.</p>
|
||||
|
||||
<h1 id='examples-20' class='section-header'><a href='#examples-20'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>3</span>, <span class='boolval'>false</span>);
|
||||
<span class='ident'>bv</span>.<span class='ident'>reserve</span>(<span class='number'>10</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>capacity</span>() <span class='op'>>=</span> <span class='number'>13</span>);</pre>
|
||||
</div><h4 id='method.capacity' class='method'><code>fn <a href='#method.capacity' class='fnname'>capacity</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
<div class='docblock'><p>Returns the capacity in bits for this bit vector. Inserting any
|
||||
element less than this amount will not trigger a resizing.</p>
|
||||
|
||||
<h1 id='examples-21' class='section-header'><a href='#examples-21'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>new</span>();
|
||||
<span class='ident'>bv</span>.<span class='ident'>reserve</span>(<span class='number'>10</span>);
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>capacity</span>() <span class='op'>>=</span> <span class='number'>10</span>);</pre>
|
||||
</div><h4 id='method.grow' class='method'><code>fn <a href='#method.grow' class='fnname'>grow</a>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, value: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>)</code></h4>
|
||||
<div class='docblock'><p>Grows the <code>BitVec</code> in-place, adding <code>n</code> copies of <code>value</code> to the <code>BitVec</code>.</p>
|
||||
|
||||
<h1 id='panics-7' class='section-header'><a href='#panics-7'>Panics</a></h1>
|
||||
<p>Panics if the new len overflows a <code>usize</code>.</p>
|
||||
|
||||
<h1 id='examples-22' class='section-header'><a href='#examples-22'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='number'>0b01001011</span>]);
|
||||
<span class='ident'>bv</span>.<span class='ident'>grow</span>(<span class='number'>2</span>, <span class='boolval'>true</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>len</span>(), <span class='number'>10</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>to_bytes</span>(), [<span class='number'>0b01001011</span>, <span class='number'>0b11000000</span>]);</pre>
|
||||
</div><h4 id='method.pop' class='method'><code>fn <a href='#method.pop' class='fnname'>pop</a>(&mut self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>></code></h4>
|
||||
<div class='docblock'><p>Removes the last bit from the BitVec, and returns it. Returns None if the BitVec is empty.</p>
|
||||
|
||||
<h1 id='examples-23' class='section-header'><a href='#examples-23'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&</span>[<span class='number'>0b01001001</span>]);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='boolval'>true</span>));
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='boolval'>false</span>));
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>len</span>(), <span class='number'>6</span>);</pre>
|
||||
</div><h4 id='method.push' class='method'><code>fn <a href='#method.push' class='fnname'>push</a>(&mut self, elem: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>)</code></h4>
|
||||
<div class='docblock'><p>Pushes a <code>bool</code> onto the end.</p>
|
||||
|
||||
<h1 id='examples-24' class='section-header'><a href='#examples-24'>Examples</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>new</span>();
|
||||
<span class='ident'>bv</span>.<span class='ident'>push</span>(<span class='boolval'>true</span>);
|
||||
<span class='ident'>bv</span>.<span class='ident'>push</span>(<span class='boolval'>false</span>);
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>eq_vec</span>(<span class='kw-2'>&</span>[<span class='boolval'>true</span>, <span class='boolval'>false</span>]));</pre>
|
||||
</div><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
<div class='docblock'><p>Returns the total number of bits in this vector</p>
|
||||
</div><h4 id='method.set_len' class='method'><code>unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
|
||||
<div class='docblock'><p>Sets the number of bits that this BitVec considers initialized.</p>
|
||||
|
||||
<p>Almost certainly can cause bad stuff. Only really intended for BitSet.</p>
|
||||
</div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>Returns true if there are no bits in this vector</p>
|
||||
</div><h4 id='method.clear' class='method'><code>fn <a href='#method.clear' class='fnname'>clear</a>(&mut self)</code></h4>
|
||||
<div class='docblock'><p>Clears all bits in this vector.</p>
|
||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Index.html' title='core::ops::Index'>Index</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='associatedtype.Output' class='type'><code>type Output = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.index' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/trait.Index.html#method.index' class='fnname'>index</a>(&self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='method.default' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#method.default' class='fnname'>default</a>() -> Self</code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='method.from_iter' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html#method.from_iter' class='fnname'>from_iter</a><I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>>>(iter: I) -> Self</code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='method.extend' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html#method.extend' class='fnname'>extend</a><I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>>>(&mut self, iterable: I)</code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&self) -> Self</code></h4>
|
||||
<h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='method.partial_cmp' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.partial_cmp' class='fnname'>partial_cmp</a>(&self, other: &Self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>></code></h4>
|
||||
<h4 id='method.lt' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&self, other: &Rhs) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.le' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&self, other: &Rhs) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.gt' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&self, other: &Rhs) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.ge' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&self, other: &Rhs) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='method.cmp' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.cmp' class='fnname'>cmp</a>(&self, other: &Self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, fmt: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='method.hash' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash' class='fnname'>hash</a><H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a>>(&self, state: &mut H)</code></h4>
|
||||
<h4 id='method.hash_slice' class='method'><span class="since">1.3.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a><H>(data: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[Self]</a>, state: &mut H) <span class='where'>where H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a></span></code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&self, other: &Self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.ne' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &Rhs) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'></div><h3 class='impl'><code>impl<'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a> for &'a <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='associatedtype.IntoIter' class='type'><code>type IntoIter = <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a><'a, B></code></h4>
|
||||
<h4 id='method.into_iter' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html#method.into_iter' class='fnname'>into_iter</a>(self) -> <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a><'a, B></code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a><B></code></h3><div class='impl-items'><h4 id='associatedtype.Item-1' class='type'><code>type Item = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='associatedtype.IntoIter-1' class='type'><code>type IntoIter = <a class='struct' href='../bit_vec/struct.IntoIter.html' title='bit_vec::IntoIter'>IntoIter</a><B></code></h4>
|
||||
<h4 id='method.into_iter-1' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html#method.into_iter' class='fnname'>into_iter</a>(self) -> <a class='struct' href='../bit_vec/struct.IntoIter.html' title='bit_vec::IntoIter'>IntoIter</a><B></code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "bit_vec";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Blocks` struct in crate `bit_vec`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Blocks">
|
||||
|
||||
<title>bit_vec::Blocks - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>bit_vec</a></p><script>window.sidebarCurrent = {name: 'Blocks', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>bit_vec</a>::<wbr><a class='struct' href=''>Blocks</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-443' class='srclink' href='../src/bit_vec/lib.rs.html.html#1250-1252' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Blocks<'a, B: 'a> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>An iterator over the blocks of a <code>BitVec</code>.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../bit_vec/struct.Blocks.html' title='bit_vec::Blocks'>Blocks</a><'a, B></code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = B</code></h4>
|
||||
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&mut self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></code></h4>
|
||||
<h4 id='method.size_hint' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
|
||||
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
|
||||
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a><Self></code></h4>
|
||||
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a><Self></code></h4>
|
||||
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a><Self></code></h4>
|
||||
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a><Self></code></h4>
|
||||
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a><St, B, F>(self, initial_state: St, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a><Self, St, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a><U, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a><Self, U, F> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> U</span></code></h4>
|
||||
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a><Self></code></h4>
|
||||
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
|
||||
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code></h4>
|
||||
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a><B>(self) -> B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a><B, F>(self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a><B, F>(self, init: B, f: F) -> B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
|
||||
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
|
||||
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a><A, B, FromA, FromB>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><B>, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><A>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>></span></code></h4>
|
||||
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a><'a, T>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a><Self> <span class='where'>where T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=&'a T></span></code></h4>
|
||||
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
|
||||
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a><S>(self) -> S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
|
||||
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a><P>(self) -> P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
|
||||
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
</div><h3 class='impl'><code>impl<'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a> for <a class='struct' href='../bit_vec/struct.Blocks.html' title='bit_vec::Blocks'>Blocks</a><'a, B></code></h3><div class='impl-items'><h4 id='method.next_back' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html#method.next_back' class='fnname'>next_back</a>(&mut self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></code></h4>
|
||||
</div><h3 class='impl'><code>impl<'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> for <a class='struct' href='../bit_vec/struct.Blocks.html' title='bit_vec::Blocks'>Blocks</a><'a, B></code></h3><div class='impl-items'><h4 id='method.len' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html#method.len' class='fnname'>len</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl<'a, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> + 'a> <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../bit_vec/struct.Blocks.html' title='bit_vec::Blocks'>Blocks</a><'a, B></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../bit_vec/struct.Blocks.html' title='bit_vec::Blocks'>Blocks</a><'a, B></code></h4>
|
||||
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "bit_vec";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,165 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `IntoIter` struct in crate `bit_vec`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, IntoIter">
|
||||
|
||||
<title>bit_vec::IntoIter - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>bit_vec</a></p><script>window.sidebarCurrent = {name: 'IntoIter', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>bit_vec</a>::<wbr><a class='struct' href=''>IntoIter</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-417' class='srclink' href='../src/bit_vec/lib.rs.html.html#1215-1218' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct IntoIter<B = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>> {
|
||||
// some fields omitted
|
||||
}</pre><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../bit_vec/struct.IntoIter.html' title='bit_vec::IntoIter'>IntoIter</a><B></code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&mut self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>></code></h4>
|
||||
<h4 id='method.size_hint' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
|
||||
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
|
||||
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a><Self></code></h4>
|
||||
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a><Self></code></h4>
|
||||
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a><Self></code></h4>
|
||||
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a><Self></code></h4>
|
||||
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a><St, B, F>(self, initial_state: St, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a><Self, St, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a><U, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a><Self, U, F> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> U</span></code></h4>
|
||||
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a><Self></code></h4>
|
||||
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
|
||||
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code></h4>
|
||||
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a><B>(self) -> B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a><B, F>(self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a><B, F>(self, init: B, f: F) -> B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
|
||||
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
|
||||
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a><A, B, FromA, FromB>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><B>, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><A>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>></span></code></h4>
|
||||
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a><'a, T>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a><Self> <span class='where'>where T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=&'a T></span></code></h4>
|
||||
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
|
||||
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a><S>(self) -> S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
|
||||
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a><P>(self) -> P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
|
||||
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a> for <a class='struct' href='../bit_vec/struct.IntoIter.html' title='bit_vec::IntoIter'>IntoIter</a><B></code></h3><div class='impl-items'><h4 id='method.next_back' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html#method.next_back' class='fnname'>next_back</a>(&mut self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>></code></h4>
|
||||
</div><h3 class='impl'><code>impl<B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> for <a class='struct' href='../bit_vec/struct.IntoIter.html' title='bit_vec::IntoIter'>IntoIter</a><B></code></h3><div class='impl-items'><h4 id='method.len' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html#method.len' class='fnname'>len</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "bit_vec";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Iter` struct in crate `bit_vec`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Iter">
|
||||
|
||||
<title>bit_vec::Iter - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>bit_vec</a></p><script>window.sidebarCurrent = {name: 'Iter', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>bit_vec</a>::<wbr><a class='struct' href=''>Iter</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-378' class='srclink' href='../src/bit_vec/lib.rs.html.html#1175-1178' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Iter<'a, B: 'a = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>An iterator for <code>BitVec</code>.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl<'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a><'a, B></code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&mut self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>></code></h4>
|
||||
<h4 id='method.size_hint' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
|
||||
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></code></h4>
|
||||
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a><U>(self, other: U) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a><Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
|
||||
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a><B, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a><Self></code></h4>
|
||||
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a><Self></code></h4>
|
||||
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a><P>(self, predicate: P) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a><Self, P> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a><Self></code></h4>
|
||||
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a><Self></code></h4>
|
||||
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a><St, B, F>(self, initial_state: St, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a><Self, St, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><B></span></code></h4>
|
||||
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a><U, F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a><Self, U, F> <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> U</span></code></h4>
|
||||
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a><Self></code></h4>
|
||||
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a><F>(self, f: F) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a><Self, F> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
|
||||
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code></h4>
|
||||
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a><B>(self) -> B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a><B, F>(self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a><B, F>(self, init: B, f: F) -> B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a><F>(&mut self, f: F) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
|
||||
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a><P>(&mut self, predicate: P) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>> <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
|
||||
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a><B, F>(self, f: F) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>> <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -> B</span></code></h4>
|
||||
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
|
||||
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a><A, B, FromA, FromB>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><B>, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a><A>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>></span></code></h4>
|
||||
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a><'a, T>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a><Self> <span class='where'>where T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a><Item=&'a T></span></code></h4>
|
||||
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a><Self> <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
|
||||
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a><S>(self) -> S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
|
||||
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a><P>(self) -> P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a><Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
|
||||
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a><Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
|
||||
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a><I>(self, other: I) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a><I>(self, other: I) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a><I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>></span></code></h4>
|
||||
</div><h3 class='impl'><code>impl<'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a> for <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a><'a, B></code></h3><div class='impl-items'><h4 id='method.next_back' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html#method.next_back' class='fnname'>next_back</a>(&mut self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>></code></h4>
|
||||
</div><h3 class='impl'><code>impl<'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> for <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a><'a, B></code></h3><div class='impl-items'><h4 id='method.len' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html#method.len' class='fnname'>len</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
|
||||
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl<'a, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> + 'a> <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a><'a, B></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a><'a, B></code></h4>
|
||||
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "bit_vec";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `BitBlock` trait in crate `bit_vec`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, BitBlock">
|
||||
|
||||
<title>bit_vec::BitBlock - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>bit_vec</a></p><script>window.sidebarCurrent = {name: 'BitBlock', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content trait">
|
||||
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>bit_vec</a>::<wbr><a class='trait' href=''>BitBlock</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-19' class='srclink' href='../src/bit_vec/lib.rs.html.html#105-133' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust trait'>pub trait BitBlock: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a><Self, Output=Self> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Sub.html' title='core::ops::Sub'>Sub</a><Self, Output=Self> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Shl.html' title='core::ops::Shl'>Shl</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, Output=Self> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Shr.html' title='core::ops::Shr'>Shr</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, Output=Self> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Not.html' title='core::ops::Not'>Not</a><Output=Self> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAnd.html' title='core::ops::BitAnd'>BitAnd</a><Self, Output=Self> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOr.html' title='core::ops::BitOr'>BitOr</a><Self, Output=Self> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXor.html' title='core::ops::BitXor'>BitXor</a><Self, Output=Self> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Rem.html' title='core::ops::Rem'>Rem</a><Self, Output=Self> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> {
|
||||
fn <a href='#tymethod.bits' class='fnname'>bits</a>() -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>;
|
||||
fn <a href='#tymethod.from_byte' class='fnname'>from_byte</a>(byte: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> Self;
|
||||
fn <a href='#tymethod.count_ones' class='fnname'>count_ones</a>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>;
|
||||
fn <a href='#tymethod.zero' class='fnname'>zero</a>() -> Self;
|
||||
fn <a href='#tymethod.one' class='fnname'>one</a>() -> Self;
|
||||
|
||||
fn <a href='#method.bytes' class='fnname'>bytes</a>() -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a> { ... }
|
||||
}</pre><div class='docblock'><p>Abstracts over a pile of bits (basically unsigned primitives)</p>
|
||||
</div>
|
||||
<h2 id='required-methods'>Required Methods</h2>
|
||||
<div class='methods'>
|
||||
<h3 id='tymethod.bits' class='method stab '><code>fn <a href='#tymethod.bits' class='fnname'>bits</a>() -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h3><div class='docblock'><p>How many bits it has</p>
|
||||
</div><h3 id='tymethod.from_byte' class='method stab '><code>fn <a href='#tymethod.from_byte' class='fnname'>from_byte</a>(byte: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> Self</code></h3><div class='docblock'><p>Convert a byte into this type (lowest-order bits set)</p>
|
||||
</div><h3 id='tymethod.count_ones' class='method stab '><code>fn <a href='#tymethod.count_ones' class='fnname'>count_ones</a>(self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h3><div class='docblock'><p>Count the number of 1's in the bitwise repr</p>
|
||||
</div><h3 id='tymethod.zero' class='method stab '><code>fn <a href='#tymethod.zero' class='fnname'>zero</a>() -> Self</code></h3><div class='docblock'><p>Get <code>0</code></p>
|
||||
</div><h3 id='tymethod.one' class='method stab '><code>fn <a href='#tymethod.one' class='fnname'>one</a>() -> Self</code></h3><div class='docblock'><p>Get <code>1</code></p>
|
||||
</div></div>
|
||||
<h2 id='provided-methods'>Provided Methods</h2>
|
||||
<div class='methods'>
|
||||
<h3 id='method.bytes' class='method stab '><code>fn <a href='#method.bytes' class='fnname'>bytes</a>() -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h3><div class='docblock'><p>How many bytes it has</p>
|
||||
</div></div>
|
||||
<h2 id='implementors'>Implementors</h2>
|
||||
<ul class='item-list' id='implementors-list'>
|
||||
<li><code>impl <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a> for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a></code></li>
|
||||
<li><code>impl <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a> for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a></code></li>
|
||||
<li><code>impl <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a> for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a></code></li>
|
||||
<li><code>impl <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a> for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></li>
|
||||
<li><code>impl <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a> for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></li>
|
||||
</ul><script type="text/javascript" async
|
||||
src="../implementors/bit_vec/trait.BitBlock.js">
|
||||
</script></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "bit_vec";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,122 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `bitflags` crate.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, bitflags">
|
||||
|
||||
<title>bitflags - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'></p><script>window.sidebarCurrent = {name: 'bitflags', ty: 'mod', relpath: '../'};</script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>bitflags</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-0' class='srclink' href='../src/bitflags/lib.rs.html.html#11-582' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>A typesafe bitmask flag generator.</p>
|
||||
</div><h2 id='macros' class='section-header'><a href="#macros">Macros</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='macro' href='macro.bitflags!.html'
|
||||
title='bitflags::bitflags!'>bitflags!</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>The <code>bitflags!</code> macro generates a <code>struct</code> that holds a set of C-style
|
||||
bitmask flags. It is useful for creating typesafe wrappers for C APIs.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "bitflags";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,236 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `bitflags!` macro in crate `bitflags`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, bitflags!">
|
||||
|
||||
<title>bitflags::bitflags! - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>bitflags</a></p><script>window.sidebarCurrent = {name: 'bitflags!', ty: 'macro', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content macro">
|
||||
<h1 class='fqn'><span class='in-band'><a href='index.html'>bitflags</a>::<wbr><a class='macro' href=''>bitflags!</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-4' class='srclink' href='../src/bitflags/lib.rs.html.html#133-349' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust macro'>
|
||||
<span class='macro'>macro_rules</span><span class='macro'>!</span> <span class='ident'>bitflags</span> {
|
||||
($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='ident'>flags</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>BitFlags</span>:<span class='ident'>ident</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> {
|
||||
$($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag_attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>const</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>value</span>:<span class='ident'>expr</span>),<span class='op'>+</span>
|
||||
}) <span class='op'>=></span> { ... };
|
||||
($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='ident'>flags</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>BitFlags</span>:<span class='ident'>ident</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> {
|
||||
$($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag_attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>const</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>value</span>:<span class='ident'>expr</span>),<span class='op'>+</span>,
|
||||
}) <span class='op'>=></span> { ... };
|
||||
}</pre>
|
||||
<div class='docblock'><p>The <code>bitflags!</code> macro generates a <code>struct</code> that holds a set of C-style
|
||||
bitmask flags. It is useful for creating typesafe wrappers for C APIs.</p>
|
||||
|
||||
<p>The flags should only be defined for integer types, otherwise unexpected
|
||||
type errors may occur at compile time.</p>
|
||||
|
||||
<h1 id='example' class='section-header'><a href='#example'>Example</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='attribute'>#[<span class='ident'>macro_use</span>]</span>
|
||||
<span class='kw'>extern</span> <span class='kw'>crate</span> <span class='ident'>bitflags</span>;
|
||||
|
||||
<span class='macro'>bitflags</span><span class='macro'>!</span> {
|
||||
<span class='ident'>flags</span> <span class='ident'>Flags</span>: <span class='ident'>u32</span> {
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_A</span> <span class='op'>=</span> <span class='number'>0b00000001</span>,
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_B</span> <span class='op'>=</span> <span class='number'>0b00000010</span>,
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_C</span> <span class='op'>=</span> <span class='number'>0b00000100</span>,
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_ABC</span> <span class='op'>=</span> <span class='ident'>FLAG_A</span>.<span class='ident'>bits</span>
|
||||
<span class='op'>|</span> <span class='ident'>FLAG_B</span>.<span class='ident'>bits</span>
|
||||
<span class='op'>|</span> <span class='ident'>FLAG_C</span>.<span class='ident'>bits</span>,
|
||||
}
|
||||
}
|
||||
|
||||
<span class='kw'>fn</span> <span class='ident'>main</span>() {
|
||||
<span class='kw'>let</span> <span class='ident'>e1</span> <span class='op'>=</span> <span class='ident'>FLAG_A</span> <span class='op'>|</span> <span class='ident'>FLAG_C</span>;
|
||||
<span class='kw'>let</span> <span class='ident'>e2</span> <span class='op'>=</span> <span class='ident'>FLAG_B</span> <span class='op'>|</span> <span class='ident'>FLAG_C</span>;
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>((<span class='ident'>e1</span> <span class='op'>|</span> <span class='ident'>e2</span>) <span class='op'>==</span> <span class='ident'>FLAG_ABC</span>); <span class='comment'>// union</span>
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>((<span class='ident'>e1</span> <span class='kw-2'>&</span> <span class='ident'>e2</span>) <span class='op'>==</span> <span class='ident'>FLAG_C</span>); <span class='comment'>// intersection</span>
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>((<span class='ident'>e1</span> <span class='op'>-</span> <span class='ident'>e2</span>) <span class='op'>==</span> <span class='ident'>FLAG_A</span>); <span class='comment'>// set difference</span>
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>e2</span> <span class='op'>==</span> <span class='ident'>FLAG_A</span>); <span class='comment'>// set complement</span>
|
||||
}</pre>
|
||||
|
||||
<p>The generated <code>struct</code>s can also be extended with type and trait
|
||||
implementations:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='attribute'>#[<span class='ident'>macro_use</span>]</span>
|
||||
<span class='kw'>extern</span> <span class='kw'>crate</span> <span class='ident'>bitflags</span>;
|
||||
|
||||
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>fmt</span>;
|
||||
|
||||
<span class='macro'>bitflags</span><span class='macro'>!</span> {
|
||||
<span class='ident'>flags</span> <span class='ident'>Flags</span>: <span class='ident'>u32</span> {
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_A</span> <span class='op'>=</span> <span class='number'>0b00000001</span>,
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_B</span> <span class='op'>=</span> <span class='number'>0b00000010</span>,
|
||||
}
|
||||
}
|
||||
|
||||
<span class='kw'>impl</span> <span class='ident'>Flags</span> {
|
||||
<span class='kw'>pub</span> <span class='kw'>fn</span> <span class='ident'>clear</span>(<span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='self'>self</span>) {
|
||||
<span class='self'>self</span>.<span class='ident'>bits</span> <span class='op'>=</span> <span class='number'>0</span>; <span class='comment'>// The `bits` field can be accessed from within the</span>
|
||||
<span class='comment'>// same module where the `bitflags!` macro was invoked.</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class='kw'>impl</span> <span class='ident'>fmt</span>::<span class='ident'>Display</span> <span class='kw'>for</span> <span class='ident'>Flags</span> {
|
||||
<span class='kw'>fn</span> <span class='ident'>fmt</span>(<span class='kw-2'>&</span><span class='self'>self</span>, <span class='ident'>f</span>: <span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='ident'>fmt</span>::<span class='ident'>Formatter</span>) <span class='op'>-></span> <span class='ident'>fmt</span>::<span class='prelude-ty'>Result</span> {
|
||||
<span class='macro'>write</span><span class='macro'>!</span>(<span class='ident'>f</span>, <span class='string'>"hi!"</span>)
|
||||
}
|
||||
}
|
||||
|
||||
<span class='kw'>fn</span> <span class='ident'>main</span>() {
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>flags</span> <span class='op'>=</span> <span class='ident'>FLAG_A</span> <span class='op'>|</span> <span class='ident'>FLAG_B</span>;
|
||||
<span class='ident'>flags</span>.<span class='ident'>clear</span>();
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>flags</span>.<span class='ident'>is_empty</span>());
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>"{}"</span>, <span class='ident'>flags</span>), <span class='string'>"hi!"</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>FLAG_A</span> <span class='op'>|</span> <span class='ident'>FLAG_B</span>), <span class='string'>"FLAG_A | FLAG_B"</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>FLAG_B</span>), <span class='string'>"FLAG_B"</span>);
|
||||
}</pre>
|
||||
|
||||
<h1 id='attributes' class='section-header'><a href='#attributes'>Attributes</a></h1>
|
||||
<p>Attributes can be attached to the generated <code>struct</code> by placing them
|
||||
before the <code>flags</code> keyword.</p>
|
||||
|
||||
<h1 id='trait-implementations' class='section-header'><a href='#trait-implementations'>Trait implementations</a></h1>
|
||||
<p>The <code>Copy</code>, <code>Clone</code>, <code>PartialEq</code>, <code>Eq</code>, <code>PartialOrd</code>, <code>Ord</code> and <code>Hash</code>
|
||||
traits automatically derived for the <code>struct</code> using the <code>derive</code> attribute.
|
||||
Additional traits can be derived by providing an explicit <code>derive</code>
|
||||
attribute on <code>flags</code>.</p>
|
||||
|
||||
<p>The <code>FromIterator</code> trait is implemented for the <code>struct</code>, too, calculating
|
||||
the union of the instances of the <code>struct</code> iterated over.</p>
|
||||
|
||||
<p>The <code>Debug</code> trait is also implemented by displaying the bits value of the
|
||||
internal struct.</p>
|
||||
|
||||
<h2 id='operators' class='section-header'><a href='#operators'>Operators</a></h2>
|
||||
<p>The following operator traits are implemented for the generated <code>struct</code>:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>BitOr</code>: union</li>
|
||||
<li><code>BitAnd</code>: intersection</li>
|
||||
<li><code>BitXor</code>: toggle</li>
|
||||
<li><code>Sub</code>: set difference</li>
|
||||
<li><code>Not</code>: set complement</li>
|
||||
</ul>
|
||||
|
||||
<h1 id='methods-1' class='section-header'><a href='#methods-1'>Methods</a></h1>
|
||||
<p>The following methods are defined for the generated <code>struct</code>:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>empty</code>: an empty set of flags</li>
|
||||
<li><code>all</code>: the set of all flags</li>
|
||||
<li><code>bits</code>: the raw value of the flags currently stored</li>
|
||||
<li><code>from_bits</code>: convert from underlying bit representation, unless that
|
||||
representation contains bits that do not correspond to a flag</li>
|
||||
<li><code>from_bits_truncate</code>: convert from underlying bit representation, dropping
|
||||
any bits that do not correspond to flags</li>
|
||||
<li><code>is_empty</code>: <code>true</code> if no flags are currently stored</li>
|
||||
<li><code>is_all</code>: <code>true</code> if all flags are currently set</li>
|
||||
<li><code>intersects</code>: <code>true</code> if there are flags common to both <code>self</code> and <code>other</code></li>
|
||||
<li><code>contains</code>: <code>true</code> all of the flags in <code>other</code> are contained within <code>self</code></li>
|
||||
<li><code>insert</code>: inserts the specified flags in-place</li>
|
||||
<li><code>remove</code>: removes the specified flags in-place</li>
|
||||
<li><code>toggle</code>: the specified flags will be inserted if not present, and removed
|
||||
if they are.</li>
|
||||
</ul>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "bitflags";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1 +0,0 @@
|
|||
initSidebarItems({"macro":[["bitflags!","The `bitflags!` macro generates a `struct` that holds a set of C-style bitmask flags. It is useful for creating typesafe wrappers for C APIs."]]});
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `BigEndian` enum in crate `byteorder`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, BigEndian">
|
||||
|
||||
<title>byteorder::BigEndian - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>byteorder</a></p><script>window.sidebarCurrent = {name: 'BigEndian', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>byteorder</a>::<wbr><a class='enum' href=''>BigEndian</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-260' class='srclink' href='../src/byteorder/lib.rs.html.html#262' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum BigEndian {}</pre><div class='docblock'><p>Defines big-endian serialization.</p>
|
||||
|
||||
<p>Note that this type has no value constructor. It is used purely at the
|
||||
type level.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a> for <a class='enum' href='../byteorder/enum.BigEndian.html' title='byteorder::BigEndian'>BigEndian</a></code></h3><div class='impl-items'><h4 id='method.read_u16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_u16' class='fnname'>read_u16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a></code></h4>
|
||||
<h4 id='method.read_u32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_u32' class='fnname'>read_u32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a></code></h4>
|
||||
<h4 id='method.read_u64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_u64' class='fnname'>read_u64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></h4>
|
||||
<h4 id='method.read_uint' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_uint' class='fnname'>read_uint</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></h4>
|
||||
<h4 id='method.write_u16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_u16' class='fnname'>write_u16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>)</code></h4>
|
||||
<h4 id='method.write_u32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_u32' class='fnname'>write_u32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>)</code></h4>
|
||||
<h4 id='method.write_u64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_u64' class='fnname'>write_u64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>)</code></h4>
|
||||
<h4 id='method.write_uint' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_uint' class='fnname'>write_uint</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
|
||||
<h4 id='method.read_i16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_i16' class='fnname'>read_i16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a></code></h4>
|
||||
<h4 id='method.read_i32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_i32' class='fnname'>read_i32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a></code></h4>
|
||||
<h4 id='method.read_i64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_i64' class='fnname'>read_i64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a></code></h4>
|
||||
<h4 id='method.read_int' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_int' class='fnname'>read_int</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a></code></h4>
|
||||
<h4 id='method.read_f32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_f32' class='fnname'>read_f32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a></code></h4>
|
||||
<h4 id='method.read_f64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_f64' class='fnname'>read_f64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a></code></h4>
|
||||
<h4 id='method.write_i16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_i16' class='fnname'>write_i16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>)</code></h4>
|
||||
<h4 id='method.write_i32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_i32' class='fnname'>write_i32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>)</code></h4>
|
||||
<h4 id='method.write_i64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_i64' class='fnname'>write_i64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>)</code></h4>
|
||||
<h4 id='method.write_int' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_int' class='fnname'>write_int</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
|
||||
<h4 id='method.write_f32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_f32' class='fnname'>write_f32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>)</code></h4>
|
||||
<h4 id='method.write_f64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_f64' class='fnname'>write_f64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>)</code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "byteorder";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Error` enum in crate `byteorder`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Error">
|
||||
|
||||
<title>byteorder::Error - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>byteorder</a></p><script>window.sidebarCurrent = {name: 'Error', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>byteorder</a>::<wbr><a class='enum' href=''>Error</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-16' class='srclink' href='../src/byteorder/new.rs.html.html#19-27' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum Error {
|
||||
UnexpectedEOF,
|
||||
Io(<a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>),
|
||||
}</pre><div class='docblock'><p>An error type for reading bytes.</p>
|
||||
|
||||
<p>This is a thin wrapper over the standard <code>io::Error</code> type. Namely, it
|
||||
adds one additional error case: an unexpected EOF.</p>
|
||||
|
||||
<p>Note that this error is also used for the <code>write</code> methods to keep things
|
||||
consistent.</p>
|
||||
</div><h2 class='variants'>Variants</h2>
|
||||
<table class='variants_table'><tr><td id='variant.UnexpectedEOF'><code>UnexpectedEOF</code></td><td><div class='docblock'><p>An unexpected EOF.</p>
|
||||
|
||||
<p>This occurs when a call to the underlying reader returns <code>0</code> bytes,
|
||||
but more bytes are required to decode a meaningful value.</p>
|
||||
</div></td><td></td></tr><tr><td id='variant.Io'><code>Io</code></td><td><div class='docblock'><p>Any underlying IO error that occurs while reading bytes.</p>
|
||||
</div></td><td></td></tr></table><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a><<a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>> for <a class='enum' href='../byteorder/enum.Error.html' title='byteorder::Error'>Error</a></code></h3><div class='impl-items'><h4 id='method.from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#method.from' class='fnname'>from</a>(err: <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>) -> <a class='enum' href='../byteorder/enum.Error.html' title='byteorder::Error'>Error</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html' title='core::fmt::Display'>Display</a> for <a class='enum' href='../byteorder/enum.Error.html' title='byteorder::Error'>Error</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#method.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>Error</a> for <a class='enum' href='../byteorder/enum.Error.html' title='byteorder::Error'>Error</a></code></h3><div class='impl-items'><h4 id='method.description' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description' class='fnname'>description</a>(&self) -> &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
|
||||
<h4 id='method.cause' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause' class='fnname'>cause</a>(&self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><&<a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>Error</a>></code></h4>
|
||||
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='enum' href='../byteorder/enum.Error.html' title='byteorder::Error'>Error</a></code></h3><div class='impl-items'><h4 id='method.fmt-1' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "byteorder";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `LittleEndian` enum in crate `byteorder`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, LittleEndian">
|
||||
|
||||
<title>byteorder::LittleEndian - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>byteorder</a></p><script>window.sidebarCurrent = {name: 'LittleEndian', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>byteorder</a>::<wbr><a class='enum' href=''>LittleEndian</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-261' class='srclink' href='../src/byteorder/lib.rs.html.html#268' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum LittleEndian {}</pre><div class='docblock'><p>Defines little-endian serialization.</p>
|
||||
|
||||
<p>Note that this type has no value constructor. It is used purely at the
|
||||
type level.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a> for <a class='enum' href='../byteorder/enum.LittleEndian.html' title='byteorder::LittleEndian'>LittleEndian</a></code></h3><div class='impl-items'><h4 id='method.read_u16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_u16' class='fnname'>read_u16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a></code></h4>
|
||||
<h4 id='method.read_u32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_u32' class='fnname'>read_u32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a></code></h4>
|
||||
<h4 id='method.read_u64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_u64' class='fnname'>read_u64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></h4>
|
||||
<h4 id='method.read_uint' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_uint' class='fnname'>read_uint</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></h4>
|
||||
<h4 id='method.write_u16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_u16' class='fnname'>write_u16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>)</code></h4>
|
||||
<h4 id='method.write_u32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_u32' class='fnname'>write_u32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>)</code></h4>
|
||||
<h4 id='method.write_u64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_u64' class='fnname'>write_u64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>)</code></h4>
|
||||
<h4 id='method.write_uint' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_uint' class='fnname'>write_uint</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
|
||||
<h4 id='method.read_i16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_i16' class='fnname'>read_i16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a></code></h4>
|
||||
<h4 id='method.read_i32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_i32' class='fnname'>read_i32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a></code></h4>
|
||||
<h4 id='method.read_i64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_i64' class='fnname'>read_i64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a></code></h4>
|
||||
<h4 id='method.read_int' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_int' class='fnname'>read_int</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a></code></h4>
|
||||
<h4 id='method.read_f32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_f32' class='fnname'>read_f32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a></code></h4>
|
||||
<h4 id='method.read_f64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_f64' class='fnname'>read_f64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a></code></h4>
|
||||
<h4 id='method.write_i16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_i16' class='fnname'>write_i16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>)</code></h4>
|
||||
<h4 id='method.write_i32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_i32' class='fnname'>write_i32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>)</code></h4>
|
||||
<h4 id='method.write_i64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_i64' class='fnname'>write_i64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>)</code></h4>
|
||||
<h4 id='method.write_int' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_int' class='fnname'>write_int</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
|
||||
<h4 id='method.write_f32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_f32' class='fnname'>write_f32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>)</code></h4>
|
||||
<h4 id='method.write_f64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_f64' class='fnname'>write_f64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>)</code></h4>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "byteorder";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,210 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `byteorder` crate.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, byteorder">
|
||||
|
||||
<title>byteorder - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'></p><script>window.sidebarCurrent = {name: 'byteorder', ty: 'mod', relpath: '../'};</script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>byteorder</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-0' class='srclink' href='../src/byteorder/lib.rs.html.html#1-779' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>This crate provides convenience methods for encoding and decoding numbers
|
||||
in either big-endian or little-endian order.</p>
|
||||
|
||||
<p>The organization of the crate is pretty simple. A trait, <code>ByteOrder</code>, specifies
|
||||
byte conversion methods for each type of number in Rust (sans numbers that have
|
||||
a platform dependent size like <code>usize</code> and <code>isize</code>). Two types, <code>BigEndian</code>
|
||||
and <code>LittleEndian</code> implement these methods. Finally, <code>ReadBytesExt</code> and
|
||||
<code>WriteBytesExt</code> provide convenience methods available to all types that
|
||||
implement <code>Read</code> and <code>Write</code>.</p>
|
||||
|
||||
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
|
||||
<p>Read unsigned 16 bit big-endian integers from a <code>Read</code> type:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::<span class='ident'>Cursor</span>;
|
||||
<span class='kw'>use</span> <span class='ident'>byteorder</span>::{<span class='ident'>BigEndian</span>, <span class='ident'>ReadBytesExt</span>};
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>rdr</span> <span class='op'>=</span> <span class='ident'>Cursor</span>::<span class='ident'>new</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>2</span>, <span class='number'>5</span>, <span class='number'>3</span>, <span class='number'>0</span>]);
|
||||
<span class='comment'>// Note that we use type parameters to indicate which kind of byte order</span>
|
||||
<span class='comment'>// we want!</span>
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>517</span>, <span class='ident'>rdr</span>.<span class='ident'>read_u16</span>::<span class='op'><</span><span class='ident'>BigEndian</span><span class='op'>></span>().<span class='ident'>unwrap</span>());
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>768</span>, <span class='ident'>rdr</span>.<span class='ident'>read_u16</span>::<span class='op'><</span><span class='ident'>BigEndian</span><span class='op'>></span>().<span class='ident'>unwrap</span>());</pre>
|
||||
|
||||
<p>Write unsigned 16 bit little-endian integers to a <code>Write</code> type:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>byteorder</span>::{<span class='ident'>LittleEndian</span>, <span class='ident'>WriteBytesExt</span>};
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>wtr</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[];
|
||||
<span class='ident'>wtr</span>.<span class='ident'>write_u16</span>::<span class='op'><</span><span class='ident'>LittleEndian</span><span class='op'>></span>(<span class='number'>517</span>).<span class='ident'>unwrap</span>();
|
||||
<span class='ident'>wtr</span>.<span class='ident'>write_u16</span>::<span class='op'><</span><span class='ident'>LittleEndian</span><span class='op'>></span>(<span class='number'>768</span>).<span class='ident'>unwrap</span>();
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>wtr</span>, <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>5</span>, <span class='number'>2</span>, <span class='number'>0</span>, <span class='number'>3</span>]);</pre>
|
||||
</div><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.BigEndian.html'
|
||||
title='byteorder::BigEndian'>BigEndian</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Defines big-endian serialization.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.Error.html'
|
||||
title='byteorder::Error'>Error</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An error type for reading bytes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.LittleEndian.html'
|
||||
title='byteorder::LittleEndian'>LittleEndian</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Defines little-endian serialization.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='trait' href='trait.ByteOrder.html'
|
||||
title='byteorder::ByteOrder'>ByteOrder</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>ByteOrder describes types that can serialize integers as bytes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='trait' href='trait.ReadBytesExt.html'
|
||||
title='byteorder::ReadBytesExt'>ReadBytesExt</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Extends <code>Read</code> with methods for reading numbers. (For <code>std::io</code>.)</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='trait' href='trait.WriteBytesExt.html'
|
||||
title='byteorder::WriteBytesExt'>WriteBytesExt</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Extends <code>Write</code> with methods for writing numbers. (For <code>std::io</code>.)</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='type' href='type.NativeEndian.html'
|
||||
title='byteorder::NativeEndian'>NativeEndian</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Defines system native-endian serialization.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class=' module-item'>
|
||||
<td><a class='type' href='type.Result.html'
|
||||
title='byteorder::Result'>Result</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A short-hand for <code>result::Result<T, byteorder::Error></code>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "byteorder";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../byteorder/enum.Error.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../byteorder/enum.Error.html">../../byteorder/enum.Error.html</a>...</p>
|
||||
<script>location.replace("../../byteorder/enum.Error.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1 +0,0 @@
|
|||
initSidebarItems({"enum":[["Error","An error type for reading bytes."]],"trait":[["ReadBytesExt","Extends `Read` with methods for reading numbers. (For `std::io`.)"],["WriteBytesExt","Extends `Write` with methods for writing numbers. (For `std::io`.)"]],"type":[["Result","A short-hand for `result::Result<T, byteorder::Error>`."]]});
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../byteorder/trait.ReadBytesExt.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../byteorder/trait.ReadBytesExt.html">../../byteorder/trait.ReadBytesExt.html</a>...</p>
|
||||
<script>location.replace("../../byteorder/trait.ReadBytesExt.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../byteorder/trait.WriteBytesExt.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../byteorder/trait.WriteBytesExt.html">../../byteorder/trait.WriteBytesExt.html</a>...</p>
|
||||
<script>location.replace("../../byteorder/trait.WriteBytesExt.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../byteorder/type.Result.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../byteorder/type.Result.html">../../byteorder/type.Result.html</a>...</p>
|
||||
<script>location.replace("../../byteorder/type.Result.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1 +0,0 @@
|
|||
initSidebarItems({"enum":[["BigEndian","Defines big-endian serialization."],["Error","An error type for reading bytes."],["LittleEndian","Defines little-endian serialization."]],"trait":[["ByteOrder","ByteOrder describes types that can serialize integers as bytes."],["ReadBytesExt","Extends `Read` with methods for reading numbers. (For `std::io`.)"],["WriteBytesExt","Extends `Write` with methods for writing numbers. (For `std::io`.)"]],"type":[["NativeEndian","Defines system native-endian serialization."],["Result","A short-hand for `result::Result<T, byteorder::Error>`."]]});
|
||||
|
|
@ -1,237 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `ByteOrder` trait in crate `byteorder`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, ByteOrder">
|
||||
|
||||
<title>byteorder::ByteOrder - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>byteorder</a></p><script>window.sidebarCurrent = {name: 'ByteOrder', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content trait">
|
||||
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>byteorder</a>::<wbr><a class='trait' href=''>ByteOrder</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-205' class='srclink' href='../src/byteorder/lib.rs.html.html#116-256' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust trait'>pub trait ByteOrder {
|
||||
fn <a href='#tymethod.read_u16' class='fnname'>read_u16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>;
|
||||
fn <a href='#tymethod.read_u32' class='fnname'>read_u32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>;
|
||||
fn <a href='#tymethod.read_u64' class='fnname'>read_u64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>;
|
||||
fn <a href='#tymethod.read_uint' class='fnname'>read_uint</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>;
|
||||
fn <a href='#tymethod.write_u16' class='fnname'>write_u16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>);
|
||||
fn <a href='#tymethod.write_u32' class='fnname'>write_u32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>);
|
||||
fn <a href='#tymethod.write_u64' class='fnname'>write_u64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>);
|
||||
fn <a href='#tymethod.write_uint' class='fnname'>write_uint</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>);
|
||||
|
||||
fn <a href='#method.read_i16' class='fnname'>read_i16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a> { ... }
|
||||
fn <a href='#method.read_i32' class='fnname'>read_i32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a> { ... }
|
||||
fn <a href='#method.read_i64' class='fnname'>read_i64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a> { ... }
|
||||
fn <a href='#method.read_int' class='fnname'>read_int</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a> { ... }
|
||||
fn <a href='#method.read_f32' class='fnname'>read_f32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a> { ... }
|
||||
fn <a href='#method.read_f64' class='fnname'>read_f64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a> { ... }
|
||||
fn <a href='#method.write_i16' class='fnname'>write_i16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>) { ... }
|
||||
fn <a href='#method.write_i32' class='fnname'>write_i32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>) { ... }
|
||||
fn <a href='#method.write_i64' class='fnname'>write_i64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>) { ... }
|
||||
fn <a href='#method.write_int' class='fnname'>write_int</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) { ... }
|
||||
fn <a href='#method.write_f32' class='fnname'>write_f32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) { ... }
|
||||
fn <a href='#method.write_f64' class='fnname'>write_f64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>) { ... }
|
||||
}</pre><div class='docblock'><p>ByteOrder describes types that can serialize integers as bytes.</p>
|
||||
|
||||
<p>Note that <code>Self</code> does not appear anywhere in this trait's definition!
|
||||
Therefore, in order to use it, you'll need to use syntax like
|
||||
<code>T::read_u16(&[0, 1])</code> where <code>T</code> implements <code>ByteOrder</code>.</p>
|
||||
|
||||
<p>This crate provides two types that implement <code>ByteOrder</code>: <code>BigEndian</code>
|
||||
and <code>LittleEndian</code>.</p>
|
||||
|
||||
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
|
||||
<p>Write and read <code>u32</code> numbers in little endian order:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>byteorder</span>::{<span class='ident'>ByteOrder</span>, <span class='ident'>LittleEndian</span>};
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>buf</span> <span class='op'>=</span> [<span class='number'>0</span>; <span class='number'>4</span>];
|
||||
<span class='ident'>LittleEndian</span>::<span class='ident'>write_u32</span>(<span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='ident'>buf</span>, <span class='number'>1_000_000</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>1_000_000</span>, <span class='ident'>LittleEndian</span>::<span class='ident'>read_u32</span>(<span class='kw-2'>&</span><span class='ident'>buf</span>));</pre>
|
||||
|
||||
<p>Write and read <code>i16</code> numbers in big endian order:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>byteorder</span>::{<span class='ident'>ByteOrder</span>, <span class='ident'>BigEndian</span>};
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>buf</span> <span class='op'>=</span> [<span class='number'>0</span>; <span class='number'>2</span>];
|
||||
<span class='ident'>BigEndian</span>::<span class='ident'>write_i16</span>(<span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='ident'>buf</span>, <span class='op'>-</span><span class='number'>50_000</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='op'>-</span><span class='number'>50_000</span>, <span class='ident'>BigEndian</span>::<span class='ident'>read_i16</span>(<span class='kw-2'>&</span><span class='ident'>buf</span>));</pre>
|
||||
</div>
|
||||
<h2 id='required-methods'>Required Methods</h2>
|
||||
<div class='methods'>
|
||||
<h3 id='tymethod.read_u16' class='method stab '><code>fn <a href='#tymethod.read_u16' class='fnname'>read_u16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a></code></h3><div class='docblock'><p>Reads an unsigned 16 bit integer from <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 2</code>.</p>
|
||||
</div><h3 id='tymethod.read_u32' class='method stab '><code>fn <a href='#tymethod.read_u32' class='fnname'>read_u32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a></code></h3><div class='docblock'><p>Reads an unsigned 32 bit integer from <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 4</code>.</p>
|
||||
</div><h3 id='tymethod.read_u64' class='method stab '><code>fn <a href='#tymethod.read_u64' class='fnname'>read_u64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></h3><div class='docblock'><p>Reads an unsigned 64 bit integer from <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 8</code>.</p>
|
||||
</div><h3 id='tymethod.read_uint' class='method stab '><code>fn <a href='#tymethod.read_uint' class='fnname'>read_uint</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></h3><div class='docblock'><p>Reads an unsigned n-bytes integer from <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>nbytes < 1</code> or <code>nbytes > 8</code> or
|
||||
<code>buf.len() < nbytes</code></p>
|
||||
</div><h3 id='tymethod.write_u16' class='method stab '><code>fn <a href='#tymethod.write_u16' class='fnname'>write_u16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>)</code></h3><div class='docblock'><p>Writes an unsigned 16 bit integer <code>n</code> to <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 2</code>.</p>
|
||||
</div><h3 id='tymethod.write_u32' class='method stab '><code>fn <a href='#tymethod.write_u32' class='fnname'>write_u32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>)</code></h3><div class='docblock'><p>Writes an unsigned 32 bit integer <code>n</code> to <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 4</code>.</p>
|
||||
</div><h3 id='tymethod.write_u64' class='method stab '><code>fn <a href='#tymethod.write_u64' class='fnname'>write_u64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>)</code></h3><div class='docblock'><p>Writes an unsigned 64 bit integer <code>n</code> to <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 8</code>.</p>
|
||||
</div><h3 id='tymethod.write_uint' class='method stab '><code>fn <a href='#tymethod.write_uint' class='fnname'>write_uint</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h3><div class='docblock'><p>Writes an unsigned integer <code>n</code> to <code>buf</code> using only <code>nbytes</code>.</p>
|
||||
|
||||
<p>If <code>n</code> is not representable in <code>nbytes</code>, or if <code>nbytes</code> is <code>> 8</code>, then
|
||||
this method panics.</p>
|
||||
</div></div>
|
||||
<h2 id='provided-methods'>Provided Methods</h2>
|
||||
<div class='methods'>
|
||||
<h3 id='method.read_i16' class='method stab '><code>fn <a href='#method.read_i16' class='fnname'>read_i16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a></code></h3><div class='docblock'><p>Reads a signed 16 bit integer from <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 2</code>.</p>
|
||||
</div><h3 id='method.read_i32' class='method stab '><code>fn <a href='#method.read_i32' class='fnname'>read_i32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a></code></h3><div class='docblock'><p>Reads a signed 32 bit integer from <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 4</code>.</p>
|
||||
</div><h3 id='method.read_i64' class='method stab '><code>fn <a href='#method.read_i64' class='fnname'>read_i64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a></code></h3><div class='docblock'><p>Reads a signed 64 bit integer from <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 8</code>.</p>
|
||||
</div><h3 id='method.read_int' class='method stab '><code>fn <a href='#method.read_int' class='fnname'>read_int</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a></code></h3><div class='docblock'><p>Reads a signed n-bytes integer from <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>nbytes < 1</code> or <code>nbytes > 8</code> or
|
||||
<code>buf.len() < nbytes</code></p>
|
||||
</div><h3 id='method.read_f32' class='method stab '><code>fn <a href='#method.read_f32' class='fnname'>read_f32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a></code></h3><div class='docblock'><p>Reads a IEEE754 single-precision (4 bytes) floating point number.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 4</code>.</p>
|
||||
</div><h3 id='method.read_f64' class='method stab '><code>fn <a href='#method.read_f64' class='fnname'>read_f64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a></code></h3><div class='docblock'><p>Reads a IEEE754 double-precision (8 bytes) floating point number.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 8</code>.</p>
|
||||
</div><h3 id='method.write_i16' class='method stab '><code>fn <a href='#method.write_i16' class='fnname'>write_i16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>)</code></h3><div class='docblock'><p>Writes a signed 16 bit integer <code>n</code> to <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 2</code>.</p>
|
||||
</div><h3 id='method.write_i32' class='method stab '><code>fn <a href='#method.write_i32' class='fnname'>write_i32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>)</code></h3><div class='docblock'><p>Writes a signed 32 bit integer <code>n</code> to <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 4</code>.</p>
|
||||
</div><h3 id='method.write_i64' class='method stab '><code>fn <a href='#method.write_i64' class='fnname'>write_i64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>)</code></h3><div class='docblock'><p>Writes a signed 64 bit integer <code>n</code> to <code>buf</code>.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 8</code>.</p>
|
||||
</div><h3 id='method.write_int' class='method stab '><code>fn <a href='#method.write_int' class='fnname'>write_int</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h3><div class='docblock'><p>Writes a signed integer <code>n</code> to <code>buf</code> using only <code>nbytes</code>.</p>
|
||||
|
||||
<p>If <code>n</code> is not representable in <code>nbytes</code>, or if <code>nbytes</code> is <code>> 8</code>, then
|
||||
this method panics.</p>
|
||||
</div><h3 id='method.write_f32' class='method stab '><code>fn <a href='#method.write_f32' class='fnname'>write_f32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>)</code></h3><div class='docblock'><p>Writes a IEEE754 single-precision (4 bytes) floating point number.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 4</code>.</p>
|
||||
</div><h3 id='method.write_f64' class='method stab '><code>fn <a href='#method.write_f64' class='fnname'>write_f64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>)</code></h3><div class='docblock'><p>Writes a IEEE754 double-precision (8 bytes) floating point number.</p>
|
||||
|
||||
<p>Panics when <code>buf.len() < 8</code>.</p>
|
||||
</div></div>
|
||||
<h2 id='implementors'>Implementors</h2>
|
||||
<ul class='item-list' id='implementors-list'>
|
||||
<li><code>impl <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a> for <a class='enum' href='../byteorder/enum.BigEndian.html' title='byteorder::BigEndian'>BigEndian</a></code></li>
|
||||
<li><code>impl <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a> for <a class='enum' href='../byteorder/enum.LittleEndian.html' title='byteorder::LittleEndian'>LittleEndian</a></code></li>
|
||||
</ul><script type="text/javascript" async
|
||||
src="../implementors/byteorder/trait.ByteOrder.js">
|
||||
</script></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "byteorder";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `ReadBytesExt` trait in crate `byteorder`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, ReadBytesExt">
|
||||
|
||||
<title>byteorder::ReadBytesExt - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>byteorder</a></p><script>window.sidebarCurrent = {name: 'ReadBytesExt', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content trait">
|
||||
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>byteorder</a>::<wbr><a class='trait' href=''>ReadBytesExt</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-47' class='srclink' href='../src/byteorder/new.rs.html.html#86-190' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust trait'>pub trait ReadBytesExt: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a> {
|
||||
fn <a href='#method.read_u8' class='fnname'>read_u8</a>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>> { ... }
|
||||
fn <a href='#method.read_i8' class='fnname'>read_i8</a>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i8.html'>i8</a>> { ... }
|
||||
fn <a href='#method.read_u16' class='fnname'>read_u16</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>> { ... }
|
||||
fn <a href='#method.read_i16' class='fnname'>read_i16</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>> { ... }
|
||||
fn <a href='#method.read_u32' class='fnname'>read_u32</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>> { ... }
|
||||
fn <a href='#method.read_i32' class='fnname'>read_i32</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>> { ... }
|
||||
fn <a href='#method.read_u64' class='fnname'>read_u64</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>> { ... }
|
||||
fn <a href='#method.read_i64' class='fnname'>read_i64</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>> { ... }
|
||||
fn <a href='#method.read_uint' class='fnname'>read_uint</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>> { ... }
|
||||
fn <a href='#method.read_int' class='fnname'>read_int</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>> { ... }
|
||||
fn <a href='#method.read_f32' class='fnname'>read_f32</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>> { ... }
|
||||
fn <a href='#method.read_f64' class='fnname'>read_f64</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>> { ... }
|
||||
}</pre><div class='docblock'><p>Extends <code>Read</code> with methods for reading numbers. (For <code>std::io</code>.)</p>
|
||||
|
||||
<p>Most of the methods defined here have an unconstrained type parameter that
|
||||
must be explicitly instantiated. Typically, it is instantiated with either
|
||||
the <code>BigEndian</code> or <code>LittleEndian</code> types defined in this crate.</p>
|
||||
|
||||
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
|
||||
<p>Read unsigned 16 bit big-endian integers from a <code>Read</code>:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::<span class='ident'>Cursor</span>;
|
||||
<span class='kw'>use</span> <span class='ident'>byteorder</span>::{<span class='ident'>BigEndian</span>, <span class='ident'>ReadBytesExt</span>};
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>rdr</span> <span class='op'>=</span> <span class='ident'>Cursor</span>::<span class='ident'>new</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>2</span>, <span class='number'>5</span>, <span class='number'>3</span>, <span class='number'>0</span>]);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>517</span>, <span class='ident'>rdr</span>.<span class='ident'>read_u16</span>::<span class='op'><</span><span class='ident'>BigEndian</span><span class='op'>></span>().<span class='ident'>unwrap</span>());
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>768</span>, <span class='ident'>rdr</span>.<span class='ident'>read_u16</span>::<span class='op'><</span><span class='ident'>BigEndian</span><span class='op'>></span>().<span class='ident'>unwrap</span>());</pre>
|
||||
</div>
|
||||
<h2 id='provided-methods'>Provided Methods</h2>
|
||||
<div class='methods'>
|
||||
<h3 id='method.read_u8' class='method stab '><code>fn <a href='#method.read_u8' class='fnname'>read_u8</a>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>></code></h3><div class='docblock'><p>Reads an unsigned 8 bit integer from the underlying reader.</p>
|
||||
|
||||
<p>Note that since this reads a single byte, no byte order conversions
|
||||
are used. It is included for completeness.</p>
|
||||
</div><h3 id='method.read_i8' class='method stab '><code>fn <a href='#method.read_i8' class='fnname'>read_i8</a>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i8.html'>i8</a>></code></h3><div class='docblock'><p>Reads a signed 8 bit integer from the underlying reader.</p>
|
||||
|
||||
<p>Note that since this reads a single byte, no byte order conversions
|
||||
are used. It is included for completeness.</p>
|
||||
</div><h3 id='method.read_u16' class='method stab '><code>fn <a href='#method.read_u16' class='fnname'>read_u16</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>></code></h3><div class='docblock'><p>Reads an unsigned 16 bit integer from the underlying reader.</p>
|
||||
</div><h3 id='method.read_i16' class='method stab '><code>fn <a href='#method.read_i16' class='fnname'>read_i16</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>></code></h3><div class='docblock'><p>Reads a signed 16 bit integer from the underlying reader.</p>
|
||||
</div><h3 id='method.read_u32' class='method stab '><code>fn <a href='#method.read_u32' class='fnname'>read_u32</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>></code></h3><div class='docblock'><p>Reads an unsigned 32 bit integer from the underlying reader.</p>
|
||||
</div><h3 id='method.read_i32' class='method stab '><code>fn <a href='#method.read_i32' class='fnname'>read_i32</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>></code></h3><div class='docblock'><p>Reads a signed 32 bit integer from the underlying reader.</p>
|
||||
</div><h3 id='method.read_u64' class='method stab '><code>fn <a href='#method.read_u64' class='fnname'>read_u64</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>></code></h3><div class='docblock'><p>Reads an unsigned 64 bit integer from the underlying reader.</p>
|
||||
</div><h3 id='method.read_i64' class='method stab '><code>fn <a href='#method.read_i64' class='fnname'>read_i64</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>></code></h3><div class='docblock'><p>Reads a signed 64 bit integer from the underlying reader.</p>
|
||||
</div><h3 id='method.read_uint' class='method stab '><code>fn <a href='#method.read_uint' class='fnname'>read_uint</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>></code></h3><div class='docblock'><p>Reads an unsigned n-bytes integer from the underlying reader.</p>
|
||||
</div><h3 id='method.read_int' class='method stab '><code>fn <a href='#method.read_int' class='fnname'>read_int</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>></code></h3><div class='docblock'><p>Reads a signed n-bytes integer from the underlying reader.</p>
|
||||
</div><h3 id='method.read_f32' class='method stab '><code>fn <a href='#method.read_f32' class='fnname'>read_f32</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>></code></h3><div class='docblock'><p>Reads a IEEE754 single-precision (4 bytes) floating point number from
|
||||
the underlying reader.</p>
|
||||
</div><h3 id='method.read_f64' class='method stab '><code>fn <a href='#method.read_f64' class='fnname'>read_f64</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>></code></h3><div class='docblock'><p>Reads a IEEE754 double-precision (8 bytes) floating point number from
|
||||
the underlying reader.</p>
|
||||
</div></div>
|
||||
<h2 id='implementors'>Implementors</h2>
|
||||
<ul class='item-list' id='implementors-list'>
|
||||
</ul><script type="text/javascript" async
|
||||
src="../implementors/byteorder/trait.ReadBytesExt.js">
|
||||
</script></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "byteorder";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,174 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `WriteBytesExt` trait in crate `byteorder`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, WriteBytesExt">
|
||||
|
||||
<title>byteorder::WriteBytesExt - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>byteorder</a></p><script>window.sidebarCurrent = {name: 'WriteBytesExt', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content trait">
|
||||
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>byteorder</a>::<wbr><a class='trait' href=''>WriteBytesExt</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-134' class='srclink' href='../src/byteorder/new.rs.html.html#231-345' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust trait'>pub trait WriteBytesExt: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html' title='std::io::Write'>Write</a> {
|
||||
fn <a href='#method.write_u8' class='fnname'>write_u8</a>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>> { ... }
|
||||
fn <a href='#method.write_i8' class='fnname'>write_i8</a>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i8.html'>i8</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>> { ... }
|
||||
fn <a href='#method.write_u16' class='fnname'>write_u16</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>> { ... }
|
||||
fn <a href='#method.write_i16' class='fnname'>write_i16</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>> { ... }
|
||||
fn <a href='#method.write_u32' class='fnname'>write_u32</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>> { ... }
|
||||
fn <a href='#method.write_i32' class='fnname'>write_i32</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>> { ... }
|
||||
fn <a href='#method.write_u64' class='fnname'>write_u64</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>> { ... }
|
||||
fn <a href='#method.write_i64' class='fnname'>write_i64</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>> { ... }
|
||||
fn <a href='#method.write_uint' class='fnname'>write_uint</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>> { ... }
|
||||
fn <a href='#method.write_int' class='fnname'>write_int</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>> { ... }
|
||||
fn <a href='#method.write_f32' class='fnname'>write_f32</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>> { ... }
|
||||
fn <a href='#method.write_f64' class='fnname'>write_f64</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>> { ... }
|
||||
}</pre><div class='docblock'><p>Extends <code>Write</code> with methods for writing numbers. (For <code>std::io</code>.)</p>
|
||||
|
||||
<p>Most of the methods defined here have an unconstrained type parameter that
|
||||
must be explicitly instantiated. Typically, it is instantiated with either
|
||||
the <code>BigEndian</code> or <code>LittleEndian</code> types defined in this crate.</p>
|
||||
|
||||
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
|
||||
<p>Write unsigned 16 bit big-endian integers to a <code>Write</code>:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>byteorder</span>::{<span class='ident'>BigEndian</span>, <span class='ident'>WriteBytesExt</span>};
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>wtr</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[];
|
||||
<span class='ident'>wtr</span>.<span class='ident'>write_u16</span>::<span class='op'><</span><span class='ident'>BigEndian</span><span class='op'>></span>(<span class='number'>517</span>).<span class='ident'>unwrap</span>();
|
||||
<span class='ident'>wtr</span>.<span class='ident'>write_u16</span>::<span class='op'><</span><span class='ident'>BigEndian</span><span class='op'>></span>(<span class='number'>768</span>).<span class='ident'>unwrap</span>();
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>wtr</span>, <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>2</span>, <span class='number'>5</span>, <span class='number'>3</span>, <span class='number'>0</span>]);</pre>
|
||||
</div>
|
||||
<h2 id='provided-methods'>Provided Methods</h2>
|
||||
<div class='methods'>
|
||||
<h3 id='method.write_u8' class='method stab '><code>fn <a href='#method.write_u8' class='fnname'>write_u8</a>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h3><div class='docblock'><p>Writes an unsigned 8 bit integer to the underlying writer.</p>
|
||||
|
||||
<p>Note that since this writes a single byte, no byte order conversions
|
||||
are used. It is included for completeness.</p>
|
||||
</div><h3 id='method.write_i8' class='method stab '><code>fn <a href='#method.write_i8' class='fnname'>write_i8</a>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i8.html'>i8</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h3><div class='docblock'><p>Writes a signed 8 bit integer to the underlying writer.</p>
|
||||
|
||||
<p>Note that since this writes a single byte, no byte order conversions
|
||||
are used. It is included for completeness.</p>
|
||||
</div><h3 id='method.write_u16' class='method stab '><code>fn <a href='#method.write_u16' class='fnname'>write_u16</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h3><div class='docblock'><p>Writes an unsigned 16 bit integer to the underlying writer.</p>
|
||||
</div><h3 id='method.write_i16' class='method stab '><code>fn <a href='#method.write_i16' class='fnname'>write_i16</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h3><div class='docblock'><p>Writes a signed 16 bit integer to the underlying writer.</p>
|
||||
</div><h3 id='method.write_u32' class='method stab '><code>fn <a href='#method.write_u32' class='fnname'>write_u32</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h3><div class='docblock'><p>Writes an unsigned 32 bit integer to the underlying writer.</p>
|
||||
</div><h3 id='method.write_i32' class='method stab '><code>fn <a href='#method.write_i32' class='fnname'>write_i32</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h3><div class='docblock'><p>Writes a signed 32 bit integer to the underlying writer.</p>
|
||||
</div><h3 id='method.write_u64' class='method stab '><code>fn <a href='#method.write_u64' class='fnname'>write_u64</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h3><div class='docblock'><p>Writes an unsigned 64 bit integer to the underlying writer.</p>
|
||||
</div><h3 id='method.write_i64' class='method stab '><code>fn <a href='#method.write_i64' class='fnname'>write_i64</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h3><div class='docblock'><p>Writes a signed 64 bit integer to the underlying writer.</p>
|
||||
</div><h3 id='method.write_uint' class='method stab '><code>fn <a href='#method.write_uint' class='fnname'>write_uint</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h3><div class='docblock'><p>Writes an unsigned n-bytes integer to the underlying writer.</p>
|
||||
|
||||
<p>If the given integer is not representable in the given number of bytes,
|
||||
this method panics. If <code>nbytes > 8</code>, this method panics.</p>
|
||||
</div><h3 id='method.write_int' class='method stab '><code>fn <a href='#method.write_int' class='fnname'>write_int</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h3><div class='docblock'><p>Writes a signed n-bytes integer to the underlying writer.</p>
|
||||
|
||||
<p>If the given integer is not representable in the given number of bytes,
|
||||
this method panics. If <code>nbytes > 8</code>, this method panics.</p>
|
||||
</div><h3 id='method.write_f32' class='method stab '><code>fn <a href='#method.write_f32' class='fnname'>write_f32</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h3><div class='docblock'><p>Writes a IEEE754 single-precision (4 bytes) floating point number to
|
||||
the underlying writer.</p>
|
||||
</div><h3 id='method.write_f64' class='method stab '><code>fn <a href='#method.write_f64' class='fnname'>write_f64</a><T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>>(&mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>) -> <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h3><div class='docblock'><p>Writes a IEEE754 double-precision (8 bytes) floating point number to
|
||||
the underlying writer.</p>
|
||||
</div></div>
|
||||
<h2 id='implementors'>Implementors</h2>
|
||||
<ul class='item-list' id='implementors-list'>
|
||||
</ul><script type="text/javascript" async
|
||||
src="../implementors/byteorder/trait.WriteBytesExt.js">
|
||||
</script></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "byteorder";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,115 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `NativeEndian` type in crate `byteorder`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, NativeEndian">
|
||||
|
||||
<title>byteorder::NativeEndian - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>byteorder</a></p><script>window.sidebarCurrent = {name: 'NativeEndian', ty: 'type', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content type">
|
||||
<h1 class='fqn'><span class='in-band'><a href='index.html'>byteorder</a>::<wbr><a class='type' href=''>NativeEndian</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-262' class='srclink' href='../src/byteorder/lib.rs.html.html#275' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust typedef'>type NativeEndian = <a class='enum' href='../byteorder/enum.LittleEndian.html' title='byteorder::LittleEndian'>LittleEndian</a>;</pre><div class='docblock'><p>Defines system native-endian serialization.</p>
|
||||
|
||||
<p>Note that this type has no value constructor. It is used purely at the
|
||||
type level.</p>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "byteorder";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Result` type in crate `byteorder`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Result">
|
||||
|
||||
<title>byteorder::Result - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>byteorder</a></p><script>window.sidebarCurrent = {name: 'Result', ty: 'type', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content type">
|
||||
<h1 class='fqn'><span class='in-band'><a href='index.html'>byteorder</a>::<wbr><a class='type' href=''>Result</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-14' class='srclink' href='../src/byteorder/new.rs.html.html#9' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust typedef'>type Result<T> = <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><T, <a class='enum' href='../byteorder/enum.Error.html' title='byteorder::Error'>Error</a>>;</pre><div class='docblock'><p>A short-hand for <code>result::Result<T, byteorder::Error></code>.</p>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "byteorder";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../clap/enum.AppSettings.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../clap/enum.AppSettings.html">../../clap/enum.AppSettings.html</a>...</p>
|
||||
<script>location.replace("../../clap/enum.AppSettings.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1 +0,0 @@
|
|||
initSidebarItems({});
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue