pub struct RawUri {
pub text: String,
pub element: Option<String>,
pub attribute: Option<String>,
pub span: RawUriSpan,
}Expand description
A raw URI that got extracted from a document with a fuzzy parser. Note that this can still be invalid according to stricter URI standards
Fields§
§text: StringUnparsed URI represented as a String. There is no guarantee that it
can be parsed into a URI object
element: Option<String>Name of the element that contained the URI (e.g. a for the tag).
This is a way to classify links to make it easier to offer fine control
over the links that will be checked e.g. by trying to filter out links
that were found in unwanted tags like <pre> or <code>.
attribute: Option<String>Name of the attribute that contained the URI (e.g. src). This is a way
to classify links to make it easier to offer fine control over the links
that will be checked e.g. by trying to filter out links that were found
in unwanted attributes like srcset or manifest.
span: RawUriSpanThe position of the URI in the document.
Trait Implementations§
impl Eq for RawUri
impl StructuralPartialEq for RawUri
Auto Trait Implementations§
impl Freeze for RawUri
impl RefUnwindSafe for RawUri
impl Send for RawUri
impl Sync for RawUri
impl Unpin for RawUri
impl UnwindSafe for RawUri
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.