#[non_exhaustive]pub enum AnchorUri {
Matrix(MatrixUri),
MatrixTo(MatrixToUri),
Other(StrTendril),
}
Available on crate feature
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(StrTendril)
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)