Struct lychee_lib::AcceptSelector
source · pub struct AcceptSelector { /* private fields */ }Expand description
An AcceptSelector determines if a returned HTTP status code should be
accepted and thus counted as a valid (not broken) link.
Implementations§
source§impl AcceptSelector
impl AcceptSelector
sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new empty AcceptSelector.
sourcepub fn new_from(ranges: Vec<AcceptRange>) -> Self
pub fn new_from(ranges: Vec<AcceptRange>) -> Self
Creates a new AcceptSelector prefilled with ranges.
sourcepub fn add_range(&mut self, range: AcceptRange) -> &mut Self
pub fn add_range(&mut self, range: AcceptRange) -> &mut Self
Adds a range of accepted HTTP status codes to this AcceptSelector.
This method merges the new and existing ranges if they overlap.
sourcepub fn contains(&self, value: u16) -> bool
pub fn contains(&self, value: u16) -> bool
Returns whether this AcceptSelector contains value.
Trait Implementations§
source§impl Clone for AcceptSelector
impl Clone for AcceptSelector
source§fn clone(&self) -> AcceptSelector
fn clone(&self) -> AcceptSelector
Returns a copy of the value. Read more
1.0.0 · 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 AcceptSelector
impl Debug for AcceptSelector
source§impl Default for AcceptSelector
impl Default for AcceptSelector
source§impl<'de> Deserialize<'de> for AcceptSelector
impl<'de> Deserialize<'de> for AcceptSelector
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for AcceptSelector
impl Display for AcceptSelector
source§impl FromStr for AcceptSelector
impl FromStr for AcceptSelector
source§impl PartialEq for AcceptSelector
impl PartialEq for AcceptSelector
source§fn eq(&self, other: &AcceptSelector) -> bool
fn eq(&self, other: &AcceptSelector) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for AcceptSelector
Auto Trait Implementations§
impl RefUnwindSafe for AcceptSelector
impl Send for AcceptSelector
impl Sync for AcceptSelector
impl Unpin for AcceptSelector
impl UnwindSafe for AcceptSelector
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
source§impl<T> FromResponse for Twhere
T: DeserializeOwned,
impl<T> FromResponse for Twhere
T: DeserializeOwned,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.