pub enum ExportFormat {
Csv,
Jsonl,
Html,
Prometheus,
JUnit,
}Expand description
Supported export formats.
§Examples
use perfgate_export::ExportFormat;
let fmt = ExportFormat::Csv;
assert_eq!(ExportFormat::parse("csv"), Some(fmt));
assert_eq!(ExportFormat::parse("unknown"), None);Variants§
Csv
RFC 4180 compliant CSV with header row.
Jsonl
JSON Lines format (one JSON object per line).
Html
HTML summary table.
Prometheus
Prometheus text exposition format.
JUnit
JUnit XML format (for legacy CI/Jenkins).
Implementations§
Source§impl ExportFormat
impl ExportFormat
Sourcepub fn parse(s: &str) -> Option<ExportFormat>
pub fn parse(s: &str) -> Option<ExportFormat>
Parse format from string.
use perfgate_export::ExportFormat;
assert_eq!(ExportFormat::parse("csv"), Some(ExportFormat::Csv));
assert_eq!(ExportFormat::parse("jsonl"), Some(ExportFormat::Jsonl));
assert_eq!(ExportFormat::parse("prometheus"), Some(ExportFormat::Prometheus));
assert_eq!(ExportFormat::parse("unknown"), None);Trait Implementations§
Source§impl Clone for ExportFormat
impl Clone for ExportFormat
Source§fn clone(&self) -> ExportFormat
fn clone(&self) -> ExportFormat
Returns a duplicate 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 ExportFormat
impl Debug for ExportFormat
Source§impl FromStr for ExportFormat
impl FromStr for ExportFormat
Source§fn from_str(s: &str) -> Result<ExportFormat, <ExportFormat as FromStr>::Err>
fn from_str(s: &str) -> Result<ExportFormat, <ExportFormat as FromStr>::Err>
Parse an ExportFormat from a string.
§Examples
use perfgate_export::ExportFormat;
let fmt: ExportFormat = "junit".parse().unwrap();
assert_eq!(fmt, ExportFormat::JUnit);
let bad: Result<ExportFormat, _> = "nope".parse();
assert!(bad.is_err());Source§impl PartialEq for ExportFormat
impl PartialEq for ExportFormat
impl Copy for ExportFormat
impl Eq for ExportFormat
impl StructuralPartialEq for ExportFormat
Auto Trait Implementations§
impl Freeze for ExportFormat
impl RefUnwindSafe for ExportFormat
impl Send for ExportFormat
impl Sync for ExportFormat
impl Unpin for ExportFormat
impl UnsafeUnpin for ExportFormat
impl UnwindSafe for ExportFormat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.