pub struct ForEachRefFormatContext<'a> {Show 28 fields
pub git_dir: &'a Path,
pub db: &'a FileObjectDatabase,
pub format: ObjectFormat,
pub refname: &'a str,
pub oid: &'a ObjectId,
pub deltabase: &'a ObjectId,
pub object_type: ObjectType,
pub object_body: &'a [u8],
pub object_size: usize,
pub object_disk_size: Option<u64>,
pub color: bool,
pub quote: ForEachRefQuoteMode,
pub objectname_abbrev: Option<usize>,
pub objectname_candidates: &'a [ObjectId],
pub worktree_path: Option<&'a str>,
pub is_head: bool,
pub symref: Option<&'a str>,
pub upstream: Option<ForEachRefUpstream>,
pub push: Option<ForEachRefPush>,
pub upstream_track: Option<ForEachRefTrack>,
pub push_track: Option<ForEachRefTrack>,
pub contents: Option<ForEachRefContents<'a>>,
pub peeled_object: Option<ForEachRefPeeledObject<'a>>,
pub signature: Option<&'a dyn ForEachRefSignatureVerification>,
pub peeled_signature: Option<&'a dyn ForEachRefSignatureVerification>,
pub mailmap: &'a dyn ForEachRefMailmapRewrite,
pub ref_names: &'a HashSet<String>,
pub warn_ambiguous_refs: bool,
}Fields§
§git_dir: &'a Path§db: &'a FileObjectDatabase§format: ObjectFormat§refname: &'a str§oid: &'a ObjectId§deltabase: &'a ObjectId§object_type: ObjectType§object_body: &'a [u8]§object_size: usize§object_disk_size: Option<u64>§color: bool§quote: ForEachRefQuoteMode§objectname_abbrev: Option<usize>§objectname_candidates: &'a [ObjectId]§worktree_path: Option<&'a str>§is_head: bool§symref: Option<&'a str>§upstream: Option<ForEachRefUpstream>§push: Option<ForEachRefPush>§upstream_track: Option<ForEachRefTrack>§push_track: Option<ForEachRefTrack>§contents: Option<ForEachRefContents<'a>>§peeled_object: Option<ForEachRefPeeledObject<'a>>§signature: Option<&'a dyn ForEachRefSignatureVerification>§peeled_signature: Option<&'a dyn ForEachRefSignatureVerification>§mailmap: &'a dyn ForEachRefMailmapRewrite§ref_names: &'a HashSet<String>§warn_ambiguous_refs: boolImplementations§
Source§impl ForEachRefFormatContext<'_>
impl ForEachRefFormatContext<'_>
Sourcepub fn shorten_ref(&self, refname: &str) -> String
pub fn shorten_ref(&self, refname: &str) -> String
Shorten a fully-qualified refname to its unambiguous abbreviation, the
way git’s %(refname:short) / %(symref:short) / %(upstream:short) do.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ForEachRefFormatContext<'a>
impl<'a> !Send for ForEachRefFormatContext<'a>
impl<'a> !Sync for ForEachRefFormatContext<'a>
impl<'a> !UnwindSafe for ForEachRefFormatContext<'a>
impl<'a> Freeze for ForEachRefFormatContext<'a>
impl<'a> Unpin for ForEachRefFormatContext<'a>
impl<'a> UnsafeUnpin for ForEachRefFormatContext<'a>
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