Struct InterfaceName
pub struct InterfaceName<'a>(/* private fields */);Expand description
An interface name, stored as a:b/c@1.2.3
Implementations§
§impl<'a> InterfaceName<'a>
impl<'a> InterfaceName<'a>
pub fn projection(&self) -> KebabStr<'a>
pub fn projection(&self) -> KebabStr<'a>
Returns the d/e in a:b:c/d/e
pub fn version(&self, suffix: Option<&str>) -> Result<Option<Version>, Error>
pub fn version(&self, suffix: Option<&str>) -> Result<Option<Version>, Error>
Returns the 1.2.3 in a:b:c/d/e@1.2.3
The suffix provided here is the optionally specified versionsuffix
field in the binary format. This is appended to the version to form the
full version, if specified. If None then the name is required to have
a full version as-is.
Trait Implementations§
§impl<'a> Clone for InterfaceName<'a>
impl<'a> Clone for InterfaceName<'a>
§fn clone(&self) -> InterfaceName<'a>
fn clone(&self) -> InterfaceName<'a>
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 more§impl<'a> Debug for InterfaceName<'a>
impl<'a> Debug for InterfaceName<'a>
impl Eq for InterfaceName<'_>
§impl Hash for InterfaceName<'_>
impl Hash for InterfaceName<'_>
§impl Ord for InterfaceName<'_>
impl Ord for InterfaceName<'_>
§fn cmp(&self, other: &InterfaceName<'_>) -> Ordering
fn cmp(&self, other: &InterfaceName<'_>) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl PartialEq for InterfaceName<'_>
impl PartialEq for InterfaceName<'_>
§impl PartialOrd for InterfaceName<'_>
impl PartialOrd for InterfaceName<'_>
Auto Trait Implementations§
impl<'a> Freeze for InterfaceName<'a>
impl<'a> RefUnwindSafe for InterfaceName<'a>
impl<'a> Send for InterfaceName<'a>
impl<'a> Sync for InterfaceName<'a>
impl<'a> Unpin for InterfaceName<'a>
impl<'a> UnsafeUnpin for InterfaceName<'a>
impl<'a> UnwindSafe for InterfaceName<'a>
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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