pub struct Builder { /* private fields */ }Expand description
A builder to write a spectrum.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn set_format(self, format: Format) -> Self
pub fn set_format(self, format: Format) -> Self
Set format to write.
If unset, the plain text format will be used.
Sourcepub fn set_precision(self, precision: usize) -> Self
pub fn set_precision(self, precision: usize) -> Self
Set precision.
This is only used for the plain text format. If unset, a precision of six digits will be used.
Sourcepub fn write<W, S: State>(
self,
writer: &mut W,
spectrum: &Spectrum<S>,
) -> Result<()>where
W: Write,
pub fn write<W, S: State>(
self,
writer: &mut W,
spectrum: &Spectrum<S>,
) -> Result<()>where
W: Write,
Write spectrum to writer.
Sourcepub fn write_to_stdout<S: State>(self, spectrum: &Spectrum<S>) -> Result<()>
pub fn write_to_stdout<S: State>(self, spectrum: &Spectrum<S>) -> Result<()>
Write spectrum to stdout.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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