pub struct LocatorEntry {
pub uri: String,
}Expand description
A parsed locator entry. The URI is owned so the entry outlives the cursor’s borrow.
Fields§
§uri: StringImplementations§
Source§impl LocatorEntry
impl LocatorEntry
Sourcepub fn scheme(&self) -> Option<&str>
pub fn scheme(&self) -> Option<&str>
Extract the scheme (substring before the first :). Returns
None if there is no colon — but parsers reject such inputs
up front, so callers can treat this as infallible for any
locator that came from parse_locator_entry.
Sourcepub fn scheme_specific_part(&self) -> Option<&str>
pub fn scheme_specific_part(&self) -> Option<&str>
Extract the scheme-specific part (everything after the first
:). Returns None if there is no colon.
Trait Implementations§
Source§impl Clone for LocatorEntry
impl Clone for LocatorEntry
Source§fn clone(&self) -> LocatorEntry
fn clone(&self) -> LocatorEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LocatorEntry
impl Debug for LocatorEntry
impl Eq for LocatorEntry
Source§impl Hash for LocatorEntry
impl Hash for LocatorEntry
Source§impl PartialEq for LocatorEntry
impl PartialEq for LocatorEntry
impl StructuralPartialEq for LocatorEntry
Auto Trait Implementations§
impl Freeze for LocatorEntry
impl RefUnwindSafe for LocatorEntry
impl Send for LocatorEntry
impl Sync for LocatorEntry
impl Unpin for LocatorEntry
impl UnsafeUnpin for LocatorEntry
impl UnwindSafe for LocatorEntry
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<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> ⓘ
Converts
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> ⓘ
Converts
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 more