pub struct CodeCell {
pub source: Source,
pub metadata: CellMetadata,
pub execution_count: Option<i32>,
pub outputs: Vec<Output>,
}Expand description
Code cell with execution outputs
Fields§
§source: SourceCell source code
metadata: CellMetadataCell metadata
execution_count: Option<i32>Execution count (null if not executed, may be negative in some notebook implementations)
outputs: Vec<Output>Cell outputs
Implementations§
Source§impl CodeCell
impl CodeCell
Sourcepub fn timing(&self) -> Option<ExecutionTiming>
pub fn timing(&self) -> Option<ExecutionTiming>
Get execution timing from cell metadata
JupyterLab 1.2+ can record timing information in cell metadata under the “execution” key. Returns None if timing data is not present or cannot be parsed.
Sourcepub fn duration(&self) -> Option<Duration>
pub fn duration(&self) -> Option<Duration>
Get execution duration (total time from busy to idle)
This is a convenience method that extracts timing and calculates duration.
Sourcepub fn has_timing(&self) -> bool
pub fn has_timing(&self) -> bool
Check if this cell has timing metadata
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CodeCell
impl<'de> Deserialize<'de> for CodeCell
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
Auto Trait Implementations§
impl Freeze for CodeCell
impl RefUnwindSafe for CodeCell
impl Send for CodeCell
impl Sync for CodeCell
impl Unpin for CodeCell
impl UnwindSafe for CodeCell
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