pub struct ProseRenderer { /* private fields */ }Expand description
Renders output as rich human-readable prose.
Implementations§
Source§impl ProseRenderer
impl ProseRenderer
Sourcepub fn with_writer(w: impl Write + 'static) -> Self
pub fn with_writer(w: impl Write + 'static) -> Self
Creates a renderer writing to an arbitrary Write sink (used in tests).
Trait Implementations§
Source§impl Default for ProseRenderer
impl Default for ProseRenderer
Source§impl Renderer for ProseRenderer
impl Renderer for ProseRenderer
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 ProseRenderer
impl !Send for ProseRenderer
impl !Sync for ProseRenderer
impl !UnwindSafe for ProseRenderer
impl Freeze for ProseRenderer
impl Unpin for ProseRenderer
impl UnsafeUnpin for ProseRenderer
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