pub enum BatchIndex {
Usize(usize),
Uuid(Uuid),
}
Expand description
Represents the type of index found in the file names.
Variants§
Implementations§
Source§impl BatchIndex
impl BatchIndex
pub fn new() -> Self
pub fn from_uuid_str(x: &str) -> Result<Self, UuidParseError>
Trait Implementations§
Source§impl Clone for BatchIndex
impl Clone for BatchIndex
Source§fn clone(&self) -> BatchIndex
fn clone(&self) -> BatchIndex
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BatchIndex
impl Debug for BatchIndex
Source§impl<'de> Deserialize<'de> for BatchIndex
impl<'de> Deserialize<'de> for BatchIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for BatchIndex
impl Display for BatchIndex
Source§impl FilePattern for BatchIndex
impl FilePattern for BatchIndex
Source§fn file_pattern(&self) -> Regex
fn file_pattern(&self) -> Regex
Constructs a regex pattern for matching batch filenames based on the provided BatchIndex
.
§Arguments
self
- TheBatchIndex
(either Usize or Uuid) which is used to determine the regex pattern.
§Returns
Regex
- A compiled regex pattern for matching batch file names.
§Panics
This function will panic if the regex pattern is invalid.
Source§impl From<&BatchIndex> for BatchIndexType
impl From<&BatchIndex> for BatchIndexType
Source§fn from(x: &BatchIndex) -> BatchIndexType
fn from(x: &BatchIndex) -> BatchIndexType
Converts to this type from the input type.
Source§impl Hash for BatchIndex
impl Hash for BatchIndex
Source§impl Ord for BatchIndex
impl Ord for BatchIndex
Source§fn cmp(&self, other: &BatchIndex) -> Ordering
fn cmp(&self, other: &BatchIndex) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for BatchIndex
impl PartialEq for BatchIndex
Source§impl PartialOrd for BatchIndex
impl PartialOrd for BatchIndex
Source§impl Serialize for BatchIndex
impl Serialize for BatchIndex
impl Eq for BatchIndex
impl StructuralPartialEq for BatchIndex
Auto Trait Implementations§
impl Freeze for BatchIndex
impl RefUnwindSafe for BatchIndex
impl Send for BatchIndex
impl Sync for BatchIndex
impl Unpin for BatchIndex
impl UnwindSafe for BatchIndex
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