pub struct BandId { /* private fields */ }
Expand description
Identifier for a band within an archive, eg ‘b0001’ or ‘b0001-0020’.
BandId
s implement a total ordering std::cmp::Ord
.
Implementations§
source§impl BandId
impl BandId
sourcepub fn next_sibling(&self) -> BandId
pub fn next_sibling(&self) -> BandId
Return the next BandId at the same level as self.
sourcepub fn from_string(s: &str) -> Result<BandId>
pub fn from_string(s: &str) -> Result<BandId>
Make a new BandId from a string form.
sourcepub fn to_string(&self) -> String
pub fn to_string(&self) -> String
Returns the string representation of this BandId.
Bands have an id which is a sequence of one or more non-negative integers.
This is externally represented as a string like b0001-0010
, which becomes
their directory name in the archive.
Numbers are zero-padded to what should normally be a reasonable length, but they can be longer.
Trait Implementations§
source§impl Ord for BandId
impl Ord for BandId
source§impl PartialOrd<BandId> for BandId
impl PartialOrd<BandId> for BandId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for BandId
impl StructuralEq for BandId
impl StructuralPartialEq for BandId
Auto Trait Implementations§
impl RefUnwindSafe for BandId
impl Send for BandId
impl Sync for BandId
impl Unpin for BandId
impl UnwindSafe for BandId
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Separable for Twhere
T: Display,
impl<T> Separable for Twhere
T: Display,
source§fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
Adds separators according to the given
SeparatorPolicy
. Read moresource§fn separate_with_commas(&self) -> String
fn separate_with_commas(&self) -> String
Inserts a comma every three digits from the right. Read more
source§fn separate_with_spaces(&self) -> String
fn separate_with_spaces(&self) -> String
Inserts a space every three digits from the right. Read more
source§fn separate_with_dots(&self) -> String
fn separate_with_dots(&self) -> String
Inserts a period every three digits from the right. Read more
source§fn separate_with_underscores(&self) -> String
fn separate_with_underscores(&self) -> String
Inserts an underscore every three digits from the right. Read more