useself::atty::{is_stderr, is_stdout}; useself::termcolor::BufferWriter; use std::{fmt, io, mem, sync::Mutex};
pub(super) mod glob { pubusesuper::termcolor::glob::*; pubusesuper::*;
}
pub(super) useself::termcolor::Buffer;
/// Log target, either `stdout`, `stderr` or a custom pipe. #[non_exhaustive] pubenum Target { /// Logs will be sent to standard output.
Stdout, /// Logs will be sent to standard error.
Stderr, /// Logs will be sent to a custom pipe.
Pipe(Box<dyn io::Write + Send + 'static>),
}
/// Log target, either `stdout`, `stderr` or a custom pipe. /// /// Same as `Target`, except the pipe is wrapped in a mutex for interior mutability. pub(super) enum WritableTarget { /// Logs will be sent to standard output.
Stdout, /// Logs will be sent to standard error.
Stderr, /// Logs will be sent to a custom pipe.
Pipe(Box<Mutex<dyn io::Write + Send + 'static>>),
}
/// A builder for a terminal writer. /// /// The target and style choice can be configured before building. #[derive(Debug)] pub(crate) struct Builder {
target: WritableTarget,
write_style: WriteStyle,
is_test: bool,
built: bool,
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.