pub struct TransportUrl { /* private fields */ }Expand description
A parsed transport URL.
Thin wrapper around url::Url that guarantees the scheme is one
Confium recognizes.
Implementations§
Source§impl TransportUrl
impl TransportUrl
Sourcepub fn host(&self) -> Option<&str>
pub fn host(&self) -> Option<&str>
The host of the URL, if present. inproc and mock URLs encode
their channel name here (the part after ://).
Sourcepub fn path(&self) -> &str
pub fn path(&self) -> &str
The path component (after the host), including a leading /.
Empty for schemes like inproc that carry no path.
Sourcepub fn channel_name(&self) -> Option<&str>
pub fn channel_name(&self) -> Option<&str>
The bare channel name for inproc/mock URLs: the host with no
port and no path. Returns None for schemes that are not
name-based.
Trait Implementations§
Source§impl Clone for TransportUrl
impl Clone for TransportUrl
Source§fn clone(&self) -> TransportUrl
fn clone(&self) -> TransportUrl
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 TransportUrl
impl Debug for TransportUrl
Auto Trait Implementations§
impl Freeze for TransportUrl
impl RefUnwindSafe for TransportUrl
impl Send for TransportUrl
impl Sync for TransportUrl
impl Unpin for TransportUrl
impl UnsafeUnpin for TransportUrl
impl UnwindSafe for TransportUrl
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