[][src]Struct cargo_whatfeatures::output::Output

pub struct Output<'a, W> { /* fields omitted */ }

Output allows for writing different formats to a Writer

Methods

impl<'a, W: Write> Output<'a, W>[src]

pub fn new(writer: &'a mut W) -> Self[src]

Create a new Output from a Writer

pub fn write_json(&mut self, data: &impl Serialize)[src]

Write json to the writer

pub fn write_text(&mut self, data: &impl RenderAsText)[src]

Write text to the writer

Trait Implementations

impl<'a, W: Debug> Debug for Output<'a, W>[src]

Auto Trait Implementations

impl<'a, W> Send for Output<'a, W> where
    W: Send

impl<'a, W> Sync for Output<'a, W> where
    W: Sync

impl<'a, W> Unpin for Output<'a, W>

impl<'a, W> !UnwindSafe for Output<'a, W>

impl<'a, W> RefUnwindSafe for Output<'a, W> where
    W: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]