pub struct Regex { /* private fields */ }Implementations§
Source§impl Regex
impl Regex
pub fn compile(pattern: &str, flag: Flag) -> Result<Regex, ComplieError>
pub fn byte_code(&self) -> Vec<u8> ⓘ
pub fn capture_count(&self) -> usize
pub const fn from_static( byte_code: &'static [u8], capture_count: usize, ) -> Regex
pub fn test(&self, s: &str) -> bool
pub fn try_match<'a>(&self, s: &'a str) -> Result<Vec<&'a str>, ExecError>
pub fn try_matchn<'a>( &self, s: &'a str, n: usize, ) -> Result<Vec<Vec<&'a str>>, ExecError>
pub fn try_match_all<'a>( &self, s: &'a str, ) -> Result<Vec<Vec<&'a str>>, ExecError>
pub fn try_replace<'a, F>(&self, s: &'a str, f: F) -> Result<String, ExecError>
pub fn try_replace_all<'a, F>( &self, s: &'a str, f: F, ) -> Result<String, ExecError>
pub fn try_replacen<'a, F>( &self, s: &'a str, f: F, n: usize, ) -> Result<String, ExecError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Regex
impl RefUnwindSafe for Regex
impl Send for Regex
impl Sync for Regex
impl Unpin for Regex
impl UnwindSafe for Regex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more