Skip to main content

Entry

Struct Entry 

Source
pub struct Entry { /* private fields */ }
Expand description

One live run’s entry. Ending it twice (end, then Drop) writes once.

Implementations§

Source§

impl Entry

Source

pub fn start<'a>( dir: &Path, check: &str, repo: impl FnOnce() -> &'a str, log: &Path, ) -> Option<Entry>

Sweep stale entries, then write this run’s. None on any failure. repo is asked only when an entry is written: outside a session a hook pays nothing, not even the git call behind it.

Source

pub fn end(&mut self, exit: Option<i32>, final_log: Option<&Path>)

The run is over: add exit (None: killed, or no code) and ended, name the log where it now is (final_log, after the rename), and leave the file for the watcher or a later sweep.

Trait Implementations§

Source§

impl Drop for Entry

Source§

fn drop(&mut self)

A capture dropped without end (an early return, a panic) must not leave an entry that looks live: it ends with no exit, which the pane draws as failed.

Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl Freeze for Entry

§

impl RefUnwindSafe for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnsafeUnpin for Entry

§

impl UnwindSafe for Entry

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.