[−][src]Struct conjure_object::ResourceIdentifier
A common format for wrapping existing unique identifiers to provide additional context.
Resource identifiers contain 4 components, prefixed by a format identifier ri, and separated with periods:
ri.<service>.<instance>.<type>.<locator>.
- Service: The service or application that namespaces the rest of the identifier. Must conform to the regex pattern
[a-z][a-z0-9\-]*. - Instance: An optionally empty string that represents the specific service cluster, to allow for disambiduation of
artifacts from different service clusters. Must conform to the regex pattern
([a-z0-9][a-z0-9\-]*)?. - Type: A service-specific resource type to namespace a group of locators. Must conform to the regex pattern
[a-z][a-z0-9\-\._]+. - Locator: A string used to uniquely locate the specific resource. Must conform to the regex pattern
[a-zA-Z0-9\-\._]+.
Methods
impl ResourceIdentifier[src]
pub fn new(s: &str) -> Result<ResourceIdentifier, ParseError>[src]
Creates a resource identifier from a string.
This function behaves identically to ResourceIdentifier's FromStr implementation.
pub fn from_components(
service: &str,
instance: &str,
type_: &str,
locator: &str
) -> Result<ResourceIdentifier, ParseError>[src]
service: &str,
instance: &str,
type_: &str,
locator: &str
) -> Result<ResourceIdentifier, ParseError>
Creates a resource identifier from its individual components.
pub fn service(&self) -> &str[src]
Returns the service component of the resource identifier.
pub fn instance(&self) -> &str[src]
Returns the instance component of the resource identifier.
pub fn type_(&self) -> &str[src]
Returns the type component of the resource identifier.
pub fn locator(&self) -> &str[src]
Returns the locator component of the resource identifier.
pub fn as_str(&self) -> &str[src]
Returns the string representation of the resource identifier.
pub fn into_string(self) -> String[src]
Consumes the resource identifier, returning its owned string representation.
Trait Implementations
impl Eq for ResourceIdentifier[src]
impl Clone for ResourceIdentifier[src]
fn clone(&self) -> ResourceIdentifier[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialOrd<ResourceIdentifier> for ResourceIdentifier[src]
fn partial_cmp(&self, other: &ResourceIdentifier) -> Option<Ordering>[src]
fn gt(&self, other: &ResourceIdentifier) -> bool[src]
fn ge(&self, other: &ResourceIdentifier) -> bool[src]
fn lt(&self, other: &ResourceIdentifier) -> bool[src]
fn le(&self, other: &ResourceIdentifier) -> bool[src]
impl PartialEq<ResourceIdentifier> for ResourceIdentifier[src]
fn eq(&self, other: &ResourceIdentifier) -> bool[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl AsRef<str> for ResourceIdentifier[src]
impl Ord for ResourceIdentifier[src]
fn cmp(&self, other: &ResourceIdentifier) -> Ordering[src]
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 ResourceIdentifier[src]
fn hash<H>(&self, hasher: &mut H) where
H: Hasher, [src]
H: Hasher,
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 Debug for ResourceIdentifier[src]
impl Display for ResourceIdentifier[src]
impl FromStr for ResourceIdentifier[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<ResourceIdentifier, ParseError>[src]
impl Borrow<str> for ResourceIdentifier[src]
impl Serialize for ResourceIdentifier[src]
impl<'de> Deserialize<'de> for ResourceIdentifier[src]
fn deserialize<D>(d: D) -> Result<ResourceIdentifier, D::Error> where
D: Deserializer<'de>, [src]
D: Deserializer<'de>,
Auto Trait Implementations
impl Send for ResourceIdentifier
impl Sync for ResourceIdentifier
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,