pub struct Parts(/* private fields */);Expand description
Represents a collection of parts in the ERN (Entity Resource Name), handling multiple segments.
Implementations§
Source§impl Parts
impl Parts
Sourcepub fn add_part<T>(self, part: T) -> Result<Self, ErnError>
pub fn add_part<T>(self, part: T) -> Result<Self, ErnError>
Adds a part to the collection.
§Arguments
part- ThePartto be added to the collection. Adds a part to the collection with validation.
§Arguments
part- ThePartto be added to the collection.
§Validation Rules
- Maximum of 10 parts allowed in a single Parts collection
§Returns
Result<Parts, ErnError>- The updated Parts collection or an error
Sourcepub fn into_owned(self) -> Parts
pub fn into_owned(self) -> Parts
Converts the Parts into an owned version with ’static lifetime
Trait Implementations§
Source§impl ErnComponent for Parts
Implementation for the Parts component of an ERN.
impl ErnComponent for Parts
Implementation for the Parts component of an ERN.
The Parts component represents a collection of path parts in the ERN.
Its NextState is itself, allowing for multiple parts to be added.
Source§impl FromIterator<Part> for Parts
impl FromIterator<Part> for Parts
Source§impl<'a> IntoIterator for &'a Parts
impl<'a> IntoIterator for &'a Parts
Source§impl IntoIterator for Parts
impl IntoIterator for Parts
Source§impl PartialOrd for Parts
impl PartialOrd for Parts
impl Eq for Parts
impl StructuralPartialEq for Parts
Auto Trait Implementations§
impl Freeze for Parts
impl RefUnwindSafe for Parts
impl Send for Parts
impl Sync for Parts
impl Unpin for Parts
impl UnwindSafe for Parts
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