Lines Matching refs:Captures

311     pub fn captures<'t>(&self, text: &'t str) -> Option<Captures<'t>> {
313 self.captures_read_at(&mut locs, text, 0).map(move |_| Captures {
405 /// `Captures` and returns the replaced string.
442 /// a closure of type `|&Captures| -> String` provides direct access to the
448 /// # use regex::Captures; fn main() {
450 /// let result = re.replace("Springsteen, Bruce", |caps: &Captures| {
662 /// [`Captures`](struct.Captures.html) in order to amortize allocations.
858 /// [`Captures`](struct.Captures.html), where this type does not support
911 /// Captures represents a group of captured strings for a single match.
922 pub struct Captures<'t> {
928 impl<'t> Captures<'t> {
1002 impl<'t> fmt::Debug for Captures<'t> {
1004 f.debug_tuple("Captures").field(&CapturesDebug(self)).finish()
1008 struct CapturesDebug<'c, 't>(&'c Captures<'t>);
1033 /// The text can't outlive the `Captures` object if this method is
1040 impl<'t> Index<usize> for Captures<'t> {
1055 /// The text can't outlive the `Captures` object if this method is
1062 impl<'t, 'i> Index<&'i str> for Captures<'t> {
1079 /// The lifetime `'c` corresponds to the lifetime of the `Captures` value, and
1083 caps: &'c Captures<'t>,
1122 type Item = Captures<'t>;
1124 fn next(&mut self) -> Option<Captures<'t>> {
1125 self.0.next().map(|locs| Captures {
1160 /// variants of string types and `FnMut(&Captures) -> String` (or any
1161 /// `FnMut(&Captures) -> T` where `T: AsRef<str>`), which covers most use cases.
1170 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut String);
1174 /// When doing replacements, if access to `Captures` is not needed (e.g.,
1216 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut String) {
1225 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut String) {
1235 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut String) {
1245 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut String) {
1255 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut String) {
1265 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut String) {
1284 F: FnMut(&Captures<'_>) -> T,
1287 fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut String) {
1304 fn replace_append(&mut self, _: &Captures<'_>, dst: &mut String) {