pub struct CsvRenderer { /* private fields */ }Expand description
Renders output as comma-separated values with a header row.
Implementations§
Source§impl CsvRenderer
impl CsvRenderer
Sourcepub fn with_writer(w: impl Write + 'static) -> Self
pub fn with_writer(w: impl Write + 'static) -> Self
Creates a renderer writing data to w; discards disclosure (stderr
becomes io::sink()). Keeps all existing tabular tests working without
emitting to real stderr.
Sourcepub fn with_writers(
out: impl Write + 'static,
err: impl Write + 'static,
) -> Self
pub fn with_writers( out: impl Write + 'static, err: impl Write + 'static, ) -> Self
Creates a renderer writing data to out and disclosure to err.
Used by tests that assert the stderr auth-state line.
Sourcepub fn with_options(self, opts: TableOptions) -> Self
pub fn with_options(self, opts: TableOptions) -> Self
Returns a new renderer with the given tabular options applied.
Used by Format::into_renderer_with_options and tests.
Trait Implementations§
Source§impl Default for CsvRenderer
impl Default for CsvRenderer
Source§impl Renderer for CsvRenderer
impl Renderer for CsvRenderer
Source§fn diagnostic(
&mut self,
_diag: &Diagnostic,
_meta: &MetaContext,
) -> Result<(), Diagnostic>
fn diagnostic( &mut self, _diag: &Diagnostic, _meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a diagnostic in the appropriate shape for this format.
Source§fn auth_login(
&mut self,
outcome: &AuthLoginOutcome,
_meta: &MetaContext,
) -> Result<(), Diagnostic>
fn auth_login( &mut self, outcome: &AuthLoginOutcome, _meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a successful
dsp auth login outcome.Source§fn auth_status(
&mut self,
outcome: &AuthStatusOutcome,
meta: &MetaContext,
) -> Result<(), Diagnostic>
fn auth_status( &mut self, outcome: &AuthStatusOutcome, meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp auth status outcome (logged-in or not-logged-in).Source§fn auth_logout(
&mut self,
outcome: &AuthLogoutOutcome,
_meta: &MetaContext,
) -> Result<(), Diagnostic>
fn auth_logout( &mut self, outcome: &AuthLogoutOutcome, _meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp auth logout outcome.Source§fn auth_set_token(
&mut self,
outcome: &AuthSetTokenOutcome,
_meta: &MetaContext,
) -> Result<(), Diagnostic>
fn auth_set_token( &mut self, outcome: &AuthSetTokenOutcome, _meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a successful
dsp auth set-token outcome.Source§fn project_dump(
&mut self,
outcome: &DumpOutcome,
_meta: &MetaContext,
) -> Result<(), Diagnostic>
fn project_dump( &mut self, outcome: &DumpOutcome, _meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp vre project dump outcome.Source§fn project_dump_deleted(
&mut self,
outcome: &DumpDeleteOutcome,
_meta: &MetaContext,
) -> Result<(), Diagnostic>
fn project_dump_deleted( &mut self, outcome: &DumpDeleteOutcome, _meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp vre project dump --delete outcome. Read moreSource§fn projects(
&mut self,
view: &ProjectListView,
meta: &MetaContext,
) -> Result<(), Diagnostic>
fn projects( &mut self, view: &ProjectListView, meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp vre project list result (possibly empty). Read moreSource§fn project_describe(
&mut self,
project: &ProjectDetail,
meta: &MetaContext,
) -> Result<(), Diagnostic>
fn project_describe( &mut self, project: &ProjectDetail, meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp vre project describe result (a single project). Read moreSource§fn data_model_describe(
&mut self,
detail: &DataModelDetail,
meta: &MetaContext,
) -> Result<(), Diagnostic>
fn data_model_describe( &mut self, detail: &DataModelDetail, meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp vre data-model describe result (a single data-model). Read moreSource§fn data_models(
&mut self,
view: &DataModelListView,
meta: &MetaContext,
) -> Result<(), Diagnostic>
fn data_models( &mut self, view: &DataModelListView, meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp vre data-model list result (possibly empty). Read moreSource§fn resource_types(
&mut self,
view: &ResourceTypeListView,
meta: &MetaContext,
) -> Result<(), Diagnostic>
fn resource_types( &mut self, view: &ResourceTypeListView, meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp vre resource-type list result (possibly empty). Read moreSource§fn resource_type_describe(
&mut self,
detail: &ResourceTypeDetail,
meta: &MetaContext,
) -> Result<(), Diagnostic>
fn resource_type_describe( &mut self, detail: &ResourceTypeDetail, meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp vre resource-type describe result (a single resource-type). Read moreSource§fn data_model_structure(
&mut self,
structure: &DataModelStructure,
meta: &MetaContext,
) -> Result<(), Diagnostic>
fn data_model_structure( &mut self, structure: &DataModelStructure, meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp vre data-model structure result (a single data-model’s relations). Read moreSource§fn resources(
&mut self,
view: &ResourceListView,
meta: &MetaContext,
) -> Result<(), Diagnostic>
fn resources( &mut self, view: &ResourceListView, meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp vre resource list result (possibly empty). Read moreSource§fn resource_describe(
&mut self,
detail: &ResourceDetail,
meta: &MetaContext,
) -> Result<(), Diagnostic>
fn resource_describe( &mut self, detail: &ResourceDetail, meta: &MetaContext, ) -> Result<(), Diagnostic>
Render a
dsp vre resource describe result (a single resource’s envelope). Read moreAuto Trait Implementations§
impl !RefUnwindSafe for CsvRenderer
impl !Send for CsvRenderer
impl !Sync for CsvRenderer
impl !UnwindSafe for CsvRenderer
impl Freeze for CsvRenderer
impl Unpin for CsvRenderer
impl UnsafeUnpin for CsvRenderer
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