pub trait Datapath{
type Tuple;
type WildcardableTuple;
const PATTERN: &'static str;
// Required methods
fn from_tuple(tuple: Self::Tuple) -> Self;
fn to_tuple(self) -> Self::Tuple;
fn from_wildcardable(tuple: Self::WildcardableTuple) -> String;
fn with_file(&self, file: impl Into<String>) -> DatapathFile<Self>;
fn parse(path: &str) -> Option<DatapathFile<Self>>;
fn field(&self, name: &str) -> Option<String>;
}Required Associated Constants§
Required Associated Types§
Sourcetype WildcardableTuple
type WildcardableTuple
Datapath::Tuple, but each type is wrapped in a crate::Wildcardable.
Required Methods§
fn from_tuple(tuple: Self::Tuple) -> Self
fn to_tuple(self) -> Self::Tuple
Sourcefn from_wildcardable(tuple: Self::WildcardableTuple) -> String
fn from_wildcardable(tuple: Self::WildcardableTuple) -> String
Return a string where wildcarded partitions are *.
Sourcefn with_file(&self, file: impl Into<String>) -> DatapathFile<Self>
fn with_file(&self, file: impl Into<String>) -> DatapathFile<Self>
Returns a DatapathFile with the given file at this datapath
Sourcefn parse(path: &str) -> Option<DatapathFile<Self>>
fn parse(path: &str) -> Option<DatapathFile<Self>>
Parse a string as this datapath with a (possibly empty-string)
file, returning None if this string is invalid.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.