Lines Matching defs:Captures

255     pub fn captures<'t>(&self, text: &'t [u8]) -> Option<Captures<'t>> {
257 self.captures_read_at(&mut locs, text, 0).map(move |_| Captures {
352 /// `Captures` and returns the replaced byte string.
390 /// closure of type `|&Captures| -> Vec<u8>` provides direct access to the
396 /// # use regex::bytes::Captures; fn main() {
398 /// let result = re.replace(b"Springsteen, Bruce", |caps: &Captures| {
604 /// [`Captures`](struct.Captures.html) in order to amortize allocations.
721 type Item = Captures<'t>;
723 fn next(&mut self) -> Option<Captures<'t>> {
724 self.0.next().map(|locs| Captures {
848 /// [`Captures`](struct.Captures.html), where this type does not support
901 /// Captures represents a group of captured byte strings for a single match.
912 pub struct Captures<'t> {
918 impl<'t> Captures<'t> {
992 impl<'t> fmt::Debug for Captures<'t> {
994 f.debug_tuple("Captures").field(&CapturesDebug(self)).finish()
998 struct CapturesDebug<'c, 't>(&'c Captures<'t>);
1038 /// The text can't outlive the `Captures` object if this method is
1045 impl<'t> Index<usize> for Captures<'t> {
1060 /// The text can't outlive the `Captures` object if this method is
1067 impl<'t, 'i> Index<&'i str> for Captures<'t> {
1084 /// The lifetime `'c` corresponds to the lifetime of the `Captures` value, and
1088 caps: &'c Captures<'t>,
1109 /// variants of bytes types and `FnMut(&Captures) -> Vec<u8>` (or any
1110 /// `FnMut(&Captures) -> T` where `T: AsRef<[u8]>`), which covers most use cases.
1119 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>);
1123 /// When doing replacements, if access to `Captures` is not needed (e.g.,
1165 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>) {
1174 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>) {
1184 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>) {
1194 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>) {
1204 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>) {
1214 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>) {
1233 F: FnMut(&Captures<'_>) -> T,
1236 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>) {
1253 fn replace_append(&mut self, _: &Captures<'_>, dst: &mut Vec<u8>) {