Skip to main content

Source

Struct Source 

Source
pub struct Source { /* private fields */ }

Implementations§

Source§

impl Source

Source

pub fn new(id_salt: impl Hash + Debug, file: impl Into<PathBuf>) -> Source

Source

pub fn with_head(self, head: impl Head + 'static) -> Source

Source

pub fn with_opener(self, opener: impl Opener + 'static) -> Source

Source

pub fn open_shortcut(self, shortcut: Option<KeyboardShortcut>) -> Source

Source

pub fn toolbar(self, toolbar: bool) -> Source

Source

pub fn editable(self, editable: bool) -> Source

Source

pub fn set_editable(&mut self, editable: bool)

Source

pub fn id(&self) -> Id

Source

pub fn file(&self) -> &Path

Source

pub fn text(&self) -> &str

Source

pub fn base(&self) -> &str

Source

pub fn unapplied(&self) -> bool

Source

pub fn problems(&self) -> &[Diagnostic]

Source

pub fn pending(&self) -> bool

Source

pub fn notice(&self) -> Option<&Notice>

Source

pub fn cache(&self) -> &JobCache

Source

pub fn mark(&self) -> Option<Range<usize>>

Source

pub fn selection(&self) -> Range<usize>

Source

pub fn caret(&self) -> usize

Source

pub fn choices(&self) -> &[Rect]

Source

pub fn table(&self) -> Option<&Table>

Source

pub fn bar(&self) -> &[Rect]

Source

pub fn diff_on(&self) -> bool

Source

pub fn basis(&self) -> Basis

Source

pub fn diffs(&self) -> usize

Source

pub fn reverts(&self) -> Vec<Rect>

Source

pub fn head_note(&self) -> Option<String>

Source

pub fn set_diff(&mut self, on: bool)

Source

pub fn set_basis(&mut self, basis: Basis)

Source

pub fn refresh_head(&mut self)

Source

pub fn diff(&mut self) -> Option<&Diff>

Source

pub fn editor_command(&self) -> Option<String>

Source

pub fn open_note(&self) -> Option<&'static str>

Source

pub fn open_in_editor(&mut self) -> bool

Source

pub fn select(&mut self, selection: Range<usize>)

Source

pub fn sync(&mut self, files: &Files, check: &dyn Check) -> bool

Source

pub fn take_theirs(&mut self, files: &Files, check: &dyn Check)

Source

pub fn keep_mine(&mut self, files: &Files, now: f64)

Source

pub fn edit(&mut self, text: impl Into<String>, now: f64)

Source

pub fn tick( &mut self, now: f64, files: &mut Files, history: &mut History, check: &dyn Check, ) -> Option<Changed>

Source

pub fn undo( &mut self, now: f64, files: &mut Files, history: &mut History, check: &dyn Check, ) -> Option<Changed>

Source

pub fn redo( &mut self, now: f64, files: &mut Files, history: &mut History, check: &dyn Check, ) -> Option<Changed>

Source

pub fn toggle_comment( &mut self, now: f64, files: &mut Files, history: &mut History, check: &dyn Check, ) -> Option<Changed>

Source

pub fn revert_hunk( &mut self, index: usize, now: f64, files: &mut Files, history: &mut History, check: &dyn Check, ) -> Option<Changed>

Source

pub fn reload( &mut self, files: &mut Files, history: &mut History, check: &dyn Check, ) -> Option<Changed>

Source

pub fn reveal(&mut self, range: Range<usize>)

Source

pub fn clear_mark(&mut self)

Source

pub fn jump(&mut self, byte: usize)

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,