#[non_exhaustive]pub enum AnchorUri {
Matrix(MatrixUri),
MatrixTo(MatrixToUri),
Other(Tendril<UTF8>),
}
Available on crate features
html
and matrix
only.Expand description
A URI as a value for the href
attribute of a <a>
HTML element.
This is a helper type that recognizes matrix:
and https://matrix.to
URIs to detect mentions.
If the URI is an invalid Matrix URI or does not use one of the suggested schemes, the href
attribute will be in the attrs
list of MatrixElementData
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Matrix(MatrixUri)
A matrix:
URI.
MatrixTo(MatrixToUri)
A https://matrix.to
URI.
Other(Tendril<UTF8>)
An other URL using one of the suggested schemes.
Those schemes are:
https
http
ftp
mailto
magnet
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AnchorUri
impl !RefUnwindSafe for AnchorUri
impl !Send for AnchorUri
impl !Sync for AnchorUri
impl Unpin for AnchorUri
impl UnwindSafe for AnchorUri
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