pub struct Repo { /* private fields */ }
Expand description
Wrapper around git2::Repository
.
Implementations§
Source§impl Repo
impl Repo
Sourcepub fn from_dir(path: &Path) -> Result<Self>
pub fn from_dir(path: &Path) -> Result<Self>
Get the Git repository associated with the given directory.
Sourcepub fn from_current_dir() -> Result<Self>
pub fn from_current_dir() -> Result<Self>
Get the Git repository associated with the current directory.
Sourcepub fn get_packed_refs_path(&self) -> PathBuf
pub fn get_packed_refs_path(&self) -> PathBuf
Get the path to the packed-refs
file for the repository.
Sourcepub fn get_rebase_state_dir_path(&self) -> PathBuf
pub fn get_rebase_state_dir_path(&self) -> PathBuf
Get the path to the directory inside the .git
directory which contains
state used for the current rebase (if any).
Sourcepub fn get_working_copy_path(&self) -> Option<PathBuf>
pub fn get_working_copy_path(&self) -> Option<PathBuf>
Get the path to the working copy for this repository. If the repository
is bare (has no working copy), returns None
.
Sourcepub fn open_worktree_parent_repo(&self) -> Result<Option<Self>>
pub fn open_worktree_parent_repo(&self) -> Result<Option<Self>>
If this repository is a worktree for another “parent” repository, return a Repo
object
corresponding to that repository.
Sourcepub fn get_readonly_config(&self) -> Result<impl ConfigRead>
pub fn get_readonly_config(&self) -> Result<impl ConfigRead>
Get the configuration object for the repository.
Warning: This object should only be used for read operations. Write
operations should go to the config
file under the .git/branchless
directory.
Sourcepub fn get_branchless_dir(&self) -> Result<PathBuf>
pub fn get_branchless_dir(&self) -> Result<PathBuf>
Get the directory where all repo-specific git-branchless state is stored.
Sourcepub fn get_config_path(&self) -> Result<PathBuf>
pub fn get_config_path(&self) -> Result<PathBuf>
Get the file where git-branchless-specific Git configuration is stored.
Sourcepub fn get_dag_dir(&self) -> Result<PathBuf>
pub fn get_dag_dir(&self) -> Result<PathBuf>
Get the directory where the DAG for the repository is stored.
Sourcepub fn get_man_dir(&self) -> Result<PathBuf>
pub fn get_man_dir(&self) -> Result<PathBuf>
Get the directory to store man-pages. Note that this is the man
directory, and not a subsection thereof. git-branchless
man-pages must
go into the man/man1
directory to be found by man
.
Sourcepub fn get_tempfile_dir(&self) -> Result<PathBuf>
pub fn get_tempfile_dir(&self) -> Result<PathBuf>
Get a directory suitable for storing temporary files.
In particular, this directory is guaranteed to be on the same filesystem as the Git repository itself, so you can move files between them atomically. See https://github.com/arxanas/git-branchless/discussions/120.
Sourcepub fn get_db_conn(&self) -> Result<Connection>
pub fn get_db_conn(&self) -> Result<Connection>
Get the connection to the SQLite database for this repository.
Sourcepub fn resolve_reference(
&self,
reference: &Reference<'_>,
) -> Result<ResolvedReferenceInfo>
pub fn resolve_reference( &self, reference: &Reference<'_>, ) -> Result<ResolvedReferenceInfo>
Get a snapshot of information about a given reference.
Sourcepub fn get_head_info(&self) -> Result<ResolvedReferenceInfo>
pub fn get_head_info(&self) -> Result<ResolvedReferenceInfo>
Get the OID for the repository’s HEAD
reference.
Sourcepub fn reference_name_to_oid(
&self,
name: &ReferenceName,
) -> Result<MaybeZeroOid>
pub fn reference_name_to_oid( &self, name: &ReferenceName, ) -> Result<MaybeZeroOid>
Get the OID for a given ReferenceName if it exists.
Sourcepub fn set_head(&self, oid: NonZeroOid) -> Result<()>
pub fn set_head(&self, oid: NonZeroOid) -> Result<()>
Set the HEAD
reference directly to the provided oid
. Does not touch
the working copy.
Sourcepub fn detach_head(&self, head_info: &ResolvedReferenceInfo) -> Result<()>
pub fn detach_head(&self, head_info: &ResolvedReferenceInfo) -> Result<()>
Detach HEAD
by making it point directly to its current OID, rather
than to a branch. If HEAD
is unborn, logs a warning.
Sourcepub fn is_rebase_underway(&self) -> Result<bool>
pub fn is_rebase_underway(&self) -> Result<bool>
Detect if an interactive rebase has started but not completed.
Git will send us spurious post-rewrite
events marked as amend
during an
interactive rebase, indicating that some of the commits have been rewritten
as part of the rebase plan, but not all of them. This function attempts to
detect when an interactive rebase is underway, and if the current
post-rewrite
event is spurious.
There are two practical issues for users as a result of this Git behavior:
-
During an interactive rebase, we may see many “processing 1 rewritten commit” messages, and then a final “processing X rewritten commits” message once the rebase has concluded. This is potentially confusing for users, since the operation logically only rewrote the commits once, but we displayed the message multiple times.
-
During an interactive rebase, we may warn about abandoned commits, when the next operation in the rebase plan fixes up the abandoned commit. This can happen even if no conflict occurred and the rebase completed successfully without any user intervention.
Sourcepub fn get_current_operation_type(&self) -> Option<&str>
pub fn get_current_operation_type(&self) -> Option<&str>
Get the type current multi-step operation (such as rebase
or
cherry-pick
) which is underway. Returns None
if there is no such
operation.
Sourcepub fn find_merge_base(
&self,
lhs: NonZeroOid,
rhs: NonZeroOid,
) -> Result<Option<NonZeroOid>>
pub fn find_merge_base( &self, lhs: NonZeroOid, rhs: NonZeroOid, ) -> Result<Option<NonZeroOid>>
Find the merge-base between two commits. Returns None
if a merge-base
could not be found.
Sourcepub fn get_patch_for_commit(
&self,
effects: &Effects,
commit: &Commit<'_>,
) -> Result<Option<Diff<'_>>>
pub fn get_patch_for_commit( &self, effects: &Effects, commit: &Commit<'_>, ) -> Result<Option<Diff<'_>>>
Get the patch for a commit, i.e. the diff between that commit and its parent.
If the commit has more than one parent, returns None
.
Sourcepub fn get_diff_between_trees(
&self,
effects: &Effects,
old_tree: Option<&Tree<'_>>,
new_tree: &Tree<'_>,
num_context_lines: usize,
) -> Result<Diff<'_>>
pub fn get_diff_between_trees( &self, effects: &Effects, old_tree: Option<&Tree<'_>>, new_tree: &Tree<'_>, num_context_lines: usize, ) -> Result<Diff<'_>>
Get the diff between two trees. This is more performant than calling
libgit2’s diff_tree_to_tree
directly since it dehydrates commits
before diffing them.
Sourcepub fn get_staged_paths(&self) -> Result<HashSet<PathBuf>>
pub fn get_staged_paths(&self) -> Result<HashSet<PathBuf>>
Returns the set of paths currently staged to the repository’s index.
Sourcepub fn get_paths_touched_by_commit(
&self,
commit: &Commit<'_>,
) -> Result<HashSet<PathBuf>>
pub fn get_paths_touched_by_commit( &self, commit: &Commit<'_>, ) -> Result<HashSet<PathBuf>>
Get the file paths which were added, removed, or changed by the given commit.
If the commit has no parents, returns all of the file paths in that commit’s tree.
If the commit has more than one parent, returns all file paths changed with respect to any parent.
Sourcepub fn get_patch_id(
&self,
effects: &Effects,
commit: &Commit<'_>,
) -> Result<Option<PatchId>>
pub fn get_patch_id( &self, effects: &Effects, commit: &Commit<'_>, ) -> Result<Option<PatchId>>
Get the patch ID for this commit.
Sourcepub fn revparse_single_commit(&self, spec: &str) -> Result<Option<Commit<'_>>>
pub fn revparse_single_commit(&self, spec: &str) -> Result<Option<Commit<'_>>>
Attempt to parse the user-provided object descriptor.
Sourcepub fn get_all_references(&self) -> Result<Vec<Reference<'_>>>
pub fn get_all_references(&self) -> Result<Vec<Reference<'_>>>
Find all references in the repository.
Sourcepub fn has_changed_files(
&self,
effects: &Effects,
git_run_info: &GitRunInfo,
) -> Result<bool>
pub fn has_changed_files( &self, effects: &Effects, git_run_info: &GitRunInfo, ) -> Result<bool>
Check if the repository has staged or unstaged changes. Untracked files are not included. This operation may take a while.
Sourcepub fn get_status(
&self,
effects: &Effects,
git_run_info: &GitRunInfo,
index: &Index,
head_info: &ResolvedReferenceInfo,
event_tx_id: Option<EventTransactionId>,
) -> Result<(WorkingCopySnapshot<'_>, Vec<StatusEntry>)>
pub fn get_status( &self, effects: &Effects, git_run_info: &GitRunInfo, index: &Index, head_info: &ResolvedReferenceInfo, event_tx_id: Option<EventTransactionId>, ) -> Result<(WorkingCopySnapshot<'_>, Vec<StatusEntry>)>
Returns the current status of the repo index and working copy.
Sourcepub fn create_branch(
&self,
branch_name: &str,
commit: &Commit<'_>,
force: bool,
) -> Result<Branch<'_>>
pub fn create_branch( &self, branch_name: &str, commit: &Commit<'_>, force: bool, ) -> Result<Branch<'_>>
Create a new branch or update an existing one. The provided name should
be a branch name and not a reference name, i.e. it should not start with
refs/heads/
.
Sourcepub fn create_reference(
&self,
name: &ReferenceName,
oid: NonZeroOid,
force: bool,
log_message: &str,
) -> Result<Reference<'_>>
pub fn create_reference( &self, name: &ReferenceName, oid: NonZeroOid, force: bool, log_message: &str, ) -> Result<Reference<'_>>
Create a new reference or update an existing one.
Sourcepub fn get_all_remote_names(&self) -> Result<Vec<String>>
pub fn get_all_remote_names(&self) -> Result<Vec<String>>
Get a list of all remote names.
Sourcepub fn find_reference(
&self,
name: &ReferenceName,
) -> Result<Option<Reference<'_>>>
pub fn find_reference( &self, name: &ReferenceName, ) -> Result<Option<Reference<'_>>>
Look up a reference with the given name. Returns None
if not found.
Sourcepub fn get_all_local_branches(&self) -> Result<Vec<Branch<'_>>>
pub fn get_all_local_branches(&self) -> Result<Vec<Branch<'_>>>
Get all local branches in the repository.
Sourcepub fn find_branch(
&self,
name: &str,
branch_type: BranchType,
) -> Result<Option<Branch<'_>>>
pub fn find_branch( &self, name: &str, branch_type: BranchType, ) -> Result<Option<Branch<'_>>>
Look up the branch with the given name. Returns None
if not found.
Sourcepub fn find_commit(&self, oid: NonZeroOid) -> Result<Option<Commit<'_>>>
pub fn find_commit(&self, oid: NonZeroOid) -> Result<Option<Commit<'_>>>
Look up a commit with the given OID. Returns None
if not found.
Sourcepub fn find_commit_or_fail(&self, oid: NonZeroOid) -> Result<Commit<'_>>
pub fn find_commit_or_fail(&self, oid: NonZeroOid) -> Result<Commit<'_>>
Like find_commit
, but raises a generic error if the commit could not
be found.
Sourcepub fn find_blob(&self, oid: NonZeroOid) -> Result<Option<Blob<'_>>>
pub fn find_blob(&self, oid: NonZeroOid) -> Result<Option<Blob<'_>>>
Look up a blob with the given OID. Returns None
if not found.
Sourcepub fn find_blob_or_fail(&self, oid: NonZeroOid) -> Result<Blob<'_>>
pub fn find_blob_or_fail(&self, oid: NonZeroOid) -> Result<Blob<'_>>
Like find_blob
, but raises a generic error if the blob could not be
found.
Sourcepub fn friendly_describe_commit_from_oid(
&self,
glyphs: &Glyphs,
oid: NonZeroOid,
) -> Result<StyledString>
pub fn friendly_describe_commit_from_oid( &self, glyphs: &Glyphs, oid: NonZeroOid, ) -> Result<StyledString>
Look up the commit with the given OID and render a friendly description of it, or render an error message if not found.
Sourcepub fn create_blob_from_path(&self, path: &Path) -> Result<Option<NonZeroOid>>
pub fn create_blob_from_path(&self, path: &Path) -> Result<Option<NonZeroOid>>
Read a file from disk and create a blob corresponding to its contents.
If the file doesn’t exist on disk, returns None
instead.
Sourcepub fn create_blob_from_contents(&self, contents: &[u8]) -> Result<NonZeroOid>
pub fn create_blob_from_contents(&self, contents: &[u8]) -> Result<NonZeroOid>
Create a blob corresponding to the provided byte slice.
Sourcepub fn create_commit(
&self,
update_ref: Option<&str>,
author: &Signature<'_>,
committer: &Signature<'_>,
message: &str,
tree: &Tree<'_>,
parents: Vec<&Commit<'_>>,
) -> Result<NonZeroOid>
pub fn create_commit( &self, update_ref: Option<&str>, author: &Signature<'_>, committer: &Signature<'_>, message: &str, tree: &Tree<'_>, parents: Vec<&Commit<'_>>, ) -> Result<NonZeroOid>
Create a new commit.
Sourcepub fn cherry_pick_commit(
&self,
cherry_pick_commit: &Commit<'_>,
our_commit: &Commit<'_>,
mainline: u32,
) -> Result<Index>
pub fn cherry_pick_commit( &self, cherry_pick_commit: &Commit<'_>, our_commit: &Commit<'_>, mainline: u32, ) -> Result<Index>
Cherry-pick a commit in memory and return the resulting index.
Sourcepub fn cherry_pick_fast<'repo>(
&'repo self,
patch_commit: &'repo Commit<'_>,
target_commit: &'repo Commit<'_>,
options: &CherryPickFastOptions,
) -> Result<Tree<'repo>, CreateCommitFastError>
pub fn cherry_pick_fast<'repo>( &'repo self, patch_commit: &'repo Commit<'_>, target_commit: &'repo Commit<'_>, options: &CherryPickFastOptions, ) -> Result<Tree<'repo>, CreateCommitFastError>
Cherry-pick a commit in memory and return the resulting tree.
The libgit2
routines operate on entire Index
es, which contain one
entry per file in the repository. When operating on a large repository,
this is prohibitively slow, as it takes several seconds just to write
the index to disk. To improve performance, we reduce the size of the
involved indexes by filtering out any unchanged entries from the input
trees, then call into libgit2
, then add back the unchanged entries to
the output tree.
Sourcepub fn find_tree(&self, oid: NonZeroOid) -> Result<Option<Tree<'_>>>
pub fn find_tree(&self, oid: NonZeroOid) -> Result<Option<Tree<'_>>>
Look up the tree with the given OID. Returns None
if not found.
Sourcepub fn find_tree_or_fail(&self, oid: NonZeroOid) -> Result<Tree<'_>>
pub fn find_tree_or_fail(&self, oid: NonZeroOid) -> Result<Tree<'_>>
Like find_tree
, but raises a generic error if the commit could not
be found.
Sourcepub fn write_index_to_tree(&self, index: &mut Index) -> Result<NonZeroOid>
pub fn write_index_to_tree(&self, index: &mut Index) -> Result<NonZeroOid>
Write the provided in-memory index as a tree into Git`s object database. There must be no merge conflicts in the index.
Sourcepub fn amend_fast(
&self,
parent_commit: &Commit<'_>,
opts: &AmendFastOptions<'_>,
) -> Result<Tree<'_>, CreateCommitFastError>
pub fn amend_fast( &self, parent_commit: &Commit<'_>, opts: &AmendFastOptions<'_>, ) -> Result<Tree<'_>, CreateCommitFastError>
Amends the provided parent commit in memory and returns the resulting tree.
Only amends the files provided in the options, and only supports amending from either the working tree or the index, but not both.
See Repo::cherry_pick_fast
for motivation for performing the operation
in-memory.
Trait Implementations§
Source§impl RepoExt for Repo
impl RepoExt for Repo
Source§fn get_main_branch(&self) -> Result<Branch<'_>>
fn get_main_branch(&self) -> Result<Branch<'_>>
Branch
for the main branch for the repository.Source§fn get_main_branch_oid(&self) -> Result<NonZeroOid>
fn get_main_branch_oid(&self) -> Result<NonZeroOid>
Source§fn get_branch_oid_to_names(
&self,
) -> Result<HashMap<NonZeroOid, HashSet<ReferenceName>>>
fn get_branch_oid_to_names( &self, ) -> Result<HashMap<NonZeroOid, HashSet<ReferenceName>>>
Source§fn get_references_snapshot(&self) -> Result<RepoReferencesSnapshot>
fn get_references_snapshot(&self) -> Result<RepoReferencesSnapshot>
Auto Trait Implementations§
impl Freeze for Repo
impl RefUnwindSafe for Repo
impl Send for Repo
impl !Sync for Repo
impl Unpin for Repo
impl UnwindSafe for Repo
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more