pub enum OutputType<'a> {
Png(&'a PathBuf),
Html(&'a PathBuf),
Svg(&'a PathBuf),
Browser,
}Expand description
Represents the different output types for saving or displaying plots.
This enum allows specifying whether the output should be saved to a file
in a specific format (PNG, HTML, SVG) or displayed directly in a browser.
The variants are the same on every feature surface (ADR-0002 section 4);
writing a PNG or SVG needs the static_export feature, and
Graph::render reports a GraphError::Render for them without it.
Variants§
Png(&'a PathBuf)
PNG image output with a reference to the file path where it should be saved.
Html(&'a PathBuf)
HTML document output with a reference to the file path where it should be saved.
Svg(&'a PathBuf)
SVG image output with a reference to the file path where it should be saved.
Browser
Output directly to the default web browser without saving to a file.
Trait Implementations§
Source§impl<'a> Clone for OutputType<'a>
impl<'a> Clone for OutputType<'a>
impl<'a> Copy for OutputType<'a>
Source§impl<'a> Debug for OutputType<'a>
impl<'a> Debug for OutputType<'a>
Source§impl<'a> PartialEq for OutputType<'a>
impl<'a> PartialEq for OutputType<'a>
Source§impl<'a> Serialize for OutputType<'a>
impl<'a> Serialize for OutputType<'a>
impl<'a> StructuralPartialEq for OutputType<'a>
Auto Trait Implementations§
impl<'a> Freeze for OutputType<'a>
impl<'a> RefUnwindSafe for OutputType<'a>
impl<'a> Send for OutputType<'a>
impl<'a> Sync for OutputType<'a>
impl<'a> Unpin for OutputType<'a>
impl<'a> UnsafeUnpin for OutputType<'a>
impl<'a> UnwindSafe for OutputType<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.