pub struct GlobPattern { /* private fields */ }Expand description
An include glob or regular expression with optional per-pattern overrides.
Use UrlMatch when a matching link should override request fields.
§Examples
use millipede_core::link_extraction::{GlobPattern, UrlMatch};
use regex::Regex;
let plain = GlobPattern::from("https://example.com/**");
let regex = GlobPattern::from(Regex::new(r"/items/\\d+$").unwrap());
let labeled = GlobPattern::from(UrlMatch::new("**/items/*").label("item"));Trait Implementations§
Source§impl Clone for GlobPattern
impl Clone for GlobPattern
Source§fn clone(&self) -> GlobPattern
fn clone(&self) -> GlobPattern
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GlobPattern
impl Debug for GlobPattern
Source§impl From<&str> for GlobPattern
impl From<&str> for GlobPattern
Source§impl From<Regex> for GlobPattern
Converts a compiled regular expression into a pattern with no request-field overrides.
impl From<Regex> for GlobPattern
Converts a compiled regular expression into a pattern with no request-field overrides.
Source§impl From<String> for GlobPattern
impl From<String> for GlobPattern
Auto Trait Implementations§
impl Freeze for GlobPattern
impl RefUnwindSafe for GlobPattern
impl Send for GlobPattern
impl Sync for GlobPattern
impl Unpin for GlobPattern
impl UnsafeUnpin for GlobPattern
impl UnwindSafe for GlobPattern
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