pub struct Writer { /* private fields */ }Expand description
Assembles an ASDF file.
Implementations§
Source§impl Writer
impl Writer
Sourcepub fn from_document(document: Document) -> Self
pub fn from_document(document: Document) -> Self
A writer for an existing tree.
Sourcepub fn with_options(self, options: WriteOptions) -> Self
pub fn with_options(self, options: WriteOptions) -> Self
Replace the write options.
Sourcepub fn set_document(&mut self, document: Document)
pub fn set_document(&mut self, document: Document)
Set the tree to write.
Sourcepub fn document_mut(&mut self) -> Option<&mut Document>
pub fn document_mut(&mut self) -> Option<&mut Document>
The tree being written, for mutation.
Sourcepub fn add_block(&mut self, block: PendingBlock) -> usize
pub fn add_block(&mut self, block: PendingBlock) -> usize
Queue a block, returning the index it will have in the file.
That index is what an ndarray’s source refers to.
Sourcepub fn block_count(&self) -> usize
pub fn block_count(&self) -> usize
The number of blocks queued.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Writer
impl RefUnwindSafe for Writer
impl Send for Writer
impl Sync for Writer
impl Unpin for Writer
impl UnsafeUnpin for Writer
impl UnwindSafe for Writer
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