pub struct ColorContext {
pub lane: usize,
pub is_main_branch: bool,
pub fork_point: Option<String>,
pub parent_color: Option<usize>,
}Expand description
色割り当てのためのコンテキスト情報
Fields§
§lane: usizeレーン(列)番号
is_main_branch: boolメインブランチかどうか
fork_point: Option<String>分岐元コミットのハッシュ(同じ分岐元を持つブランチは異なる色にする)
parent_color: Option<usize>親コミットの色(継続性のため)
Implementations§
Source§impl ColorContext
impl ColorContext
Sourcepub fn with_main_branch(self, is_main: bool) -> Self
pub fn with_main_branch(self, is_main: bool) -> Self
メインブランチフラグを設定
Sourcepub fn with_fork_point(self, fork_point: Option<String>) -> Self
pub fn with_fork_point(self, fork_point: Option<String>) -> Self
分岐元を設定
Sourcepub fn with_parent_color(self, parent_color: Option<usize>) -> Self
pub fn with_parent_color(self, parent_color: Option<usize>) -> Self
親の色を設定
Trait Implementations§
Source§impl Clone for ColorContext
impl Clone for ColorContext
Source§fn clone(&self) -> ColorContext
fn clone(&self) -> ColorContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ColorContext
impl RefUnwindSafe for ColorContext
impl Send for ColorContext
impl Sync for ColorContext
impl Unpin for ColorContext
impl UnwindSafe for ColorContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more