Struct reproto_core::RpName
[−]
[src]
pub struct RpName {
pub prefix: Option<String>,
pub package: RpVersionedPackage,
pub parts: Vec<String>,
}Fields
prefix: Option<String>
Alias used if the name was imported from another package.
package: RpVersionedPackage
Package that name belongs to.
parts: Vec<String>
Absolute parts of the name, from the root of the package.
Methods
impl RpName[src]
pub fn new(
prefix: Option<String>,
package: RpVersionedPackage,
parts: Vec<String>
) -> RpName[src]
prefix: Option<String>,
package: RpVersionedPackage,
parts: Vec<String>
) -> RpName
pub fn extend<I>(&self, it: I) -> RpName where
I: IntoIterator<Item = String>, [src]
I: IntoIterator<Item = String>,
pub fn push(&self, part: String) -> RpName[src]
pub fn join<S: AsRef<str>>(&self, joiner: S) -> String[src]
pub fn without_prefix(self) -> RpName[src]
Convert to a name without a prefix component.
pub fn localize(self) -> RpName[src]
Localize name.
Strips version of any type which is not imported.
pub fn without_version(self) -> RpName[src]
Convert to a name without a version component.
pub fn with_package(self, package: RpVersionedPackage) -> RpName[src]
pub fn with_parts(self, parts: Vec<String>) -> RpName[src]
Build a new name out if the given paths.
pub fn is_same(&self, other: &RpName) -> bool[src]
Trait Implementations
impl Debug for RpName[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Clone for RpName[src]
fn clone(&self) -> RpName[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 PartialEq for RpName[src]
fn eq(&self, __arg_0: &RpName) -> 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) -> bool[src]
This method tests for !=.
impl Eq for RpName[src]
impl PartialOrd for RpName[src]
fn partial_cmp(&self, __arg_0: &RpName) -> Option<Ordering>[src]
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, __arg_0: &RpName) -> 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) -> 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) -> 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) -> bool[src]
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for RpName[src]
fn cmp(&self, __arg_0: &RpName) -> Ordering[src]
This method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Hash for RpName[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)[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