pub enum ExportFormat {
Csv,
Jsonl,
Html,
Prometheus,
}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.
Implementations§
Source§impl ExportFormat
impl ExportFormat
Sourcepub fn parse(s: &str) -> Option<Self>
pub fn parse(s: &str) -> Option<Self>
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§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