pub enum Status {
    Ok(StatusCode),
    Error(ErrorKind),
    Timeout(Option<StatusCode>),
    Redirected(StatusCode),
    UnknownStatusCode(StatusCode),
    Excluded,
    Unsupported(ErrorKind),
    Cached(CacheStatus),
}
Expand description

Response status of the request.

Variants

Ok(StatusCode)

Request was successful

Error(ErrorKind)

Failed request

Timeout(Option<StatusCode>)

Request timed out

Redirected(StatusCode)

Got redirected to different resource

UnknownStatusCode(StatusCode)

The given status code is not known by lychee

Excluded

Resource was excluded from checking

Unsupported(ErrorKind)

The request type is currently not supported, for example when the URL scheme is slack:// or file:// See https://github.com/lycheeverse/lychee/issues/199

Cached(CacheStatus)

Cached request status from previous run

Implementations

Create a status object from a response and the set of accepted status codes

Returns true if the check was successful

Returns true if the check was not successful

Returns true if the check was excluded

Returns true if a check took too long to complete

Returns true if a URI is unsupported

Return a unicode icon to visualize the status

Return the HTTP status code (if any)

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more