pub struct Source { /* private fields */ }Implementations§
Source§impl Source
impl Source
pub fn new(id_salt: impl Hash + Debug, file: impl Into<PathBuf>) -> Source
pub fn with_head(self, head: impl Head + 'static) -> Source
pub fn with_opener(self, opener: impl Opener + 'static) -> Source
pub fn open_shortcut(self, shortcut: Option<KeyboardShortcut>) -> Source
pub fn toolbar(self, toolbar: bool) -> Source
pub fn editable(self, editable: bool) -> Source
pub fn set_editable(&mut self, editable: bool)
pub fn id(&self) -> Id
pub fn file(&self) -> &Path
pub fn text(&self) -> &str
pub fn base(&self) -> &str
pub fn unapplied(&self) -> bool
pub fn problems(&self) -> &[Diagnostic]
pub fn pending(&self) -> bool
pub fn notice(&self) -> Option<&Notice>
pub fn cache(&self) -> &JobCache
pub fn mark(&self) -> Option<Range<usize>>
pub fn selection(&self) -> Range<usize>
pub fn caret(&self) -> usize
pub fn choices(&self) -> &[Rect]
pub fn table(&self) -> Option<&Table>
pub fn bar(&self) -> &[Rect]
pub fn diff_on(&self) -> bool
pub fn basis(&self) -> Basis
pub fn diffs(&self) -> usize
pub fn reverts(&self) -> Vec<Rect>
pub fn head_note(&self) -> Option<String>
pub fn set_diff(&mut self, on: bool)
pub fn set_basis(&mut self, basis: Basis)
pub fn refresh_head(&mut self)
pub fn diff(&mut self) -> Option<&Diff>
pub fn editor_command(&self) -> Option<String>
pub fn open_note(&self) -> Option<&'static str>
pub fn open_in_editor(&mut self) -> bool
pub fn select(&mut self, selection: Range<usize>)
pub fn sync(&mut self, files: &Files, check: &dyn Check) -> bool
pub fn take_theirs(&mut self, files: &Files, check: &dyn Check)
pub fn keep_mine(&mut self, files: &Files, now: f64)
pub fn edit(&mut self, text: impl Into<String>, now: f64)
pub fn tick( &mut self, now: f64, files: &mut Files, history: &mut History, check: &dyn Check, ) -> Option<Changed>
pub fn undo( &mut self, now: f64, files: &mut Files, history: &mut History, check: &dyn Check, ) -> Option<Changed>
pub fn redo( &mut self, now: f64, files: &mut Files, history: &mut History, check: &dyn Check, ) -> Option<Changed>
pub fn toggle_comment( &mut self, now: f64, files: &mut Files, history: &mut History, check: &dyn Check, ) -> Option<Changed>
pub fn revert_hunk( &mut self, index: usize, now: f64, files: &mut Files, history: &mut History, check: &dyn Check, ) -> Option<Changed>
pub fn reload( &mut self, files: &mut Files, history: &mut History, check: &dyn Check, ) -> Option<Changed>
pub fn reveal(&mut self, range: Range<usize>)
pub fn clear_mark(&mut self)
pub fn jump(&mut self, byte: usize)
pub fn show( &mut self, ui: &mut Ui, files: &mut Files, history: &mut History, check: &dyn Check, select: &mut dyn FnMut(usize, &Table), ) -> Option<Changed>
Auto Trait Implementations§
impl Freeze for Source
impl !RefUnwindSafe for Source
impl !Send for Source
impl !Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
impl !UnwindSafe for Source
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> 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