Struct reproto_core::RpName
[−]
[src]
pub struct RpName<F: 'static> where
F: Flavor, { pub prefix: Option<Loc<String>>, pub package: F::Package, pub parts: Vec<String>, }
Fields
prefix: Option<Loc<String>>
Alias used if the name was imported from another package.
package: F::Package
Package that name belongs to.
parts: Vec<String>
Absolute parts of the name, from the root of the package.
Methods
impl<F: 'static> RpName<F> where
F: Flavor,
[src]
F: Flavor,
pub fn new(
prefix: Option<Loc<String>>,
package: F::Package,
parts: Vec<String>
) -> Self
[src]
prefix: Option<Loc<String>>,
package: F::Package,
parts: Vec<String>
) -> Self
pub fn extend<I>(&self, it: I) -> Self where
I: IntoIterator<Item = String>,
[src]
I: IntoIterator<Item = String>,
pub fn push(&self, part: String) -> Self
[src]
pub fn join<S: AsRef<str>>(&self, joiner: S) -> String
[src]
pub fn without_prefix(self) -> Self
[src]
Convert to a name without a prefix component.
pub fn with_package(self, package: F::Package) -> Self
[src]
pub fn with_parts(self, parts: Vec<String>) -> Self
[src]
Build a new name out if the given paths.
pub fn is_same(&self, other: &Self) -> bool
[src]
impl RpName<CoreFlavor>
[src]
pub fn without_version(self) -> Self
[src]
Convert to a name without a version component.
pub fn localize(self) -> Self
[src]
Localize name.
Strips version of any type which is not imported.
Trait Implementations
impl<F: Debug + 'static> Debug for RpName<F> where
F: Flavor,
F::Package: Debug,
[src]
F: Flavor,
F::Package: Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<F: Clone + 'static> Clone for RpName<F> where
F: Flavor,
F::Package: Clone,
[src]
F: Flavor,
F::Package: Clone,
fn clone(&self) -> RpName<F>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<F: PartialEq + 'static> PartialEq for RpName<F> where
F: Flavor,
F::Package: PartialEq,
[src]
F: Flavor,
F::Package: PartialEq,
fn eq(&self, __arg_0: &RpName<F>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RpName<F>) -> bool
[src]
This method tests for !=
.
impl<F: Eq + 'static> Eq for RpName<F> where
F: Flavor,
F::Package: Eq,
[src]
F: Flavor,
F::Package: Eq,
impl<F: PartialOrd + 'static> PartialOrd for RpName<F> where
F: Flavor,
F::Package: PartialOrd,
[src]
F: Flavor,
F::Package: PartialOrd,
fn partial_cmp(&self, __arg_0: &RpName<F>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &RpName<F>) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &RpName<F>) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &RpName<F>) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &RpName<F>) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<F: Ord + 'static> Ord for RpName<F> where
F: Flavor,
F::Package: Ord,
[src]
F: Flavor,
F::Package: Ord,
fn cmp(&self, __arg_0: &RpName<F>) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl<F: Hash + 'static> Hash for RpName<F> where
F: Flavor,
F::Package: Hash,
[src]
F: Flavor,
F::Package: Hash,
fn hash<__HF: Hasher>(&self, __arg_0: &mut __HF)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<F: 'static> Display for RpName<F> where
F: Flavor,
[src]
F: Flavor,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<F: 'static, T> Translate<T> for RpName<F> where
F: Flavor,
T: Translator<Source = F>,
[src]
F: Flavor,
T: Translator<Source = F>,