| 1 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::markerrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/::PhantomDatarust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/PhantomData#; |
| 2 | |
| 3 | use {Sourcerust-analyzer cargo random 0.12.2 source/Source#, Valuerust-analyzer cargo random 0.12.2 value/Value#}; |
| 4 | |
| 5 | /// A random sequence. |
| 6 | pub struct Sequencerust-analyzer cargo random 0.12.2 sequence/Sequence#<'l, S: ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#, V> where S: Sourcerust-analyzer cargo random 0.12.2 source/Source# + 'l, V: Valuerust-analyzer cargo random 0.12.2 value/Value# + 'l { |
| 7 | sourcerust-analyzer cargo random 0.12.2 sequence/Sequence#source.: &'l mut S, |
| 8 | phantomrust-analyzer cargo random 0.12.2 sequence/Sequence#phantom.: PhantomDatarust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/PhantomData#<&'l V>, |
| 9 | } |
| 10 | |
| 11 | impl<'l, S, V> Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<&'l mut S> for Sequencerust-analyzer cargo random 0.12.2 sequence/Sequence#<'l, S, V> where S: Sourcerust-analyzer cargo random 0.12.2 source/Source#, V: Valuerust-analyzer cargo random 0.12.2 value/Value# { |
| 12 | #[inline(always)] |
| 13 | fn fromrust-analyzer cargo random 0.12.2 sequence/impl#[`Sequence<'l, S, V>`][`From<&'l mut S>`]from().(source: &'l mut S) -> Selfrust-analyzer cargo random 0.12.2 sequence/impl#[`Sequence<'l, S, V>`][`From<&'l mut S>`] { |
| 14 | Sequencerust-analyzer cargo random 0.12.2 sequence/Sequence# { sourcerust-analyzer cargo random 0.12.2 sequence/Sequence#source.: source, phantomrust-analyzer cargo random 0.12.2 sequence/Sequence#phantom.: PhantomDatarust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/PhantomData# } |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | impl<'l, S, V> Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator# for Sequencerust-analyzer cargo random 0.12.2 sequence/Sequence#<'l, S, V> where S: Sourcerust-analyzer cargo random 0.12.2 source/Source#, V: Valuerust-analyzer cargo random 0.12.2 value/Value# { |
| 19 | type Itemrust-analyzer cargo random 0.12.2 sequence/impl#[`Sequence<'l, S, V>`][Iterator]Item# = V; |
| 20 | |
| 21 | #[inline(always)] |
| 22 | fn nextrust-analyzer cargo random 0.12.2 sequence/impl#[`Sequence<'l, S, V>`][Iterator]next().(&mut self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<V> { |
| 23 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.sourcerust-analyzer cargo random 0.12.2 sequence/Sequence#source..readrust-analyzer cargo random 0.12.2 source/Source#read().()) |
| 24 | } |
| 25 | } |