Struct git_global::Report

source ·
pub struct Report { /* private fields */ }
Expand description

A report containing the results of a git-global subcommand.

Contains overall messages and per-repo messages.

Implementations§

source§

impl Report

source

pub fn new(repos: &[Repo]) -> Report

Create a new Report for the given Repos..

source

pub fn pad_repo_output(&mut self)

Declares the desire to separate output when showing per-repo messages.

Sets flag that indicates a blank line should be inserted between messages for different repos when printing per-repo output.

source

pub fn add_message(&mut self, message: String)

Adds a message that applies to the overall operation.

source

pub fn add_repo_message(&mut self, repo: &Repo, data_line: String)

Adds a message that applies to the given repo.

source

pub fn print<W: Write>(&self, writer: &mut W)

Writes all result messages to the given writer, as text.

source

pub fn print_json<W: Write>(&self, writer: &mut W)

Writes all result messages to the given writer, as JSON.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.