pub enum FetchStatus {
Success,
NotModified,
Unavailable {
status_code: u16,
},
Unreachable {
reason: String,
},
Protected {
status_code: u16,
},
}Expand description
Fetch status distinguishing Unavailable vs Unreachable (RFC 9309)
Variants§
Success
Successfully fetched and parsed
NotModified
Not modified (304) - use cached version
Unavailable (4xx) - crawler can access everything
Unreachable
Unreachable (5xx, network error) - assume DISALLOW all
Protected
Protected (401/403) - safe mode treats as deny
Implementations§
Source§impl FetchStatus
impl FetchStatus
Sourcepub fn allows_all(&self) -> bool
pub fn allows_all(&self) -> bool
Check if this status allows all paths (RFC 9309: Unavailable)
Sourcepub fn denies_all(&self) -> bool
pub fn denies_all(&self) -> bool
Check if this status denies all paths (RFC 9309: Unreachable)
Sourcepub fn is_not_modified(&self) -> bool
pub fn is_not_modified(&self) -> bool
Check if this is a not-modified response (304)
Trait Implementations§
Source§impl Clone for FetchStatus
impl Clone for FetchStatus
Source§fn clone(&self) -> FetchStatus
fn clone(&self) -> FetchStatus
Returns a duplicate 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 FetchStatus
impl Debug for FetchStatus
Source§impl<'de> Deserialize<'de> for FetchStatus
impl<'de> Deserialize<'de> for FetchStatus
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 PartialEq for FetchStatus
impl PartialEq for FetchStatus
Source§impl Serialize for FetchStatus
impl Serialize for FetchStatus
impl Eq for FetchStatus
impl StructuralPartialEq for FetchStatus
Auto Trait Implementations§
impl Freeze for FetchStatus
impl RefUnwindSafe for FetchStatus
impl Send for FetchStatus
impl Sync for FetchStatus
impl Unpin for FetchStatus
impl UnwindSafe for FetchStatus
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.