pub struct Kaleido { /* private fields */ }Implementations§
Source§impl Kaleido
impl Kaleido
pub fn new() -> Kaleido
Sourcepub fn save(
&self,
dst: &Path,
plotly_data: &Value,
format: ImageFormat,
width: usize,
height: usize,
scale: f64,
) -> Result<(), Box<dyn Error>>
pub fn save( &self, dst: &Path, plotly_data: &Value, format: ImageFormat, width: usize, height: usize, scale: f64, ) -> Result<(), Box<dyn Error>>
Generate a static image from a Plotly graph and save it to a file
Sourcepub fn image_to_string(
&self,
plotly_data: &Value,
format: ImageFormat,
width: usize,
height: usize,
scale: f64,
) -> Result<String, Box<dyn Error>>
pub fn image_to_string( &self, plotly_data: &Value, format: ImageFormat, width: usize, height: usize, scale: f64, ) -> Result<String, Box<dyn Error>>
Generate a static image from a Plotly graph and return it as a String The output may be base64 encoded or a plain text depending on the image format provided as argument. SVG and EPS are returned in plain text while JPEG, PNG, WEBP will be returned as a base64 encoded string.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Kaleido
impl RefUnwindSafe for Kaleido
impl Send for Kaleido
impl Sync for Kaleido
impl Unpin for Kaleido
impl UnwindSafe for Kaleido
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