pub struct Notebook {
pub cells: Vec<Cell>,
pub signature: Option<String>,
pub metadata: Value,
pub nbformat: u32,
pub nbformat_minor: u32,
}
Fields§
§cells: Vec<Cell>
§signature: Option<String>
§metadata: Value
§nbformat: u32
§nbformat_minor: u32
Implementations§
Source§impl Notebook
impl Notebook
pub fn new() -> Self
pub fn from_file(filename: &str) -> Self
pub fn save(&self, filename: &str)
pub fn dumps(&self) -> String
pub fn get_cell(&self, id: &str) -> Option<&Cell>
pub fn get_mut_cell(&mut self, id: &str) -> Option<&mut Cell>
pub fn add_cell(&mut self, cell: Cell)
pub fn add_code_cell(&mut self, source: &str) -> Cell
pub fn add_markdown_cell(&mut self, source: &str) -> Cell
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Notebook
impl<'de> Deserialize<'de> for Notebook
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 Notebook
Auto Trait Implementations§
impl Freeze for Notebook
impl RefUnwindSafe for Notebook
impl Send for Notebook
impl Sync for Notebook
impl Unpin for Notebook
impl UnwindSafe for Notebook
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