pub struct Journal {
pub schema: u32,
pub apply_id: String,
pub trigger: ApplyTrigger,
pub started_at: String,
pub finished: bool,
pub outcome: Option<ApplyOutcome>,
pub files: Vec<FileRecord>,
}Expand description
One apply run.
Fields§
§schema: u32§apply_id: String§trigger: ApplyTrigger§started_at: StringRFC 3339, UTC.
finished: bool§outcome: Option<ApplyOutcome>§files: Vec<FileRecord>Implementations§
Source§impl Journal
impl Journal
Sourcepub fn start(
fs: &dyn Fs,
state_dir: &Path,
apply_id: &str,
trigger: ApplyTrigger,
started_at: String,
) -> Result<Self, CoreError>
pub fn start( fs: &dyn Fs, state_dir: &Path, apply_id: &str, trigger: ApplyTrigger, started_at: String, ) -> Result<Self, CoreError>
Starts the journal of a run and writes it.
Sourcepub fn record(
&mut self,
fs: &dyn Fs,
state_dir: &Path,
file: FileRecord,
) -> Result<(), CoreError>
pub fn record( &mut self, fs: &dyn Fs, state_dir: &Path, file: FileRecord, ) -> Result<(), CoreError>
Appends a file’s outcome and rewrites the journal.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Journal
impl<'de> Deserialize<'de> for Journal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Journal
Auto Trait Implementations§
impl Forget for Journal
impl Freeze for Journal
impl Move for Journal
impl RefUnwindSafe for Journal
impl Send for Journalwhere
RawVecInner: Send,
impl Sync for Journalwhere
RawVecInner: Sync,
impl Unpin for Journal
impl UnsafeUnpin for Journalwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<FileRecord>: UnsafeUnpin,
impl UnwindSafe for Journalwhere
RawVecInner: UnwindSafe,
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