pub enum Paper {
Figure,
Named {
name: &'static str,
width: f64,
height: f64,
},
}Expand description
The page a PostScript document is printed on (ps.papersize, or
savefig’s papertype).
Variants§
Implementations§
Trait Implementations§
impl Copy for Paper
Source§impl FromStr for Paper
impl FromStr for Paper
Source§fn from_str(name: &str) -> Result<Self, PageSetupError>
fn from_str(name: &str) -> Result<Self, PageSetupError>
Parses a paper name as Paper::from_name does; matplotlib’s
former "auto" is refused like any unknown name.
use pltrs_render::Paper;
assert!(matches!("A4".parse(), Ok(Paper::Named { name: "a4", .. })));
assert_eq!("figure".parse(), Ok(Paper::Figure));
assert!("auto".parse::<Paper>().is_err());Source§type Err = PageSetupError
type Err = PageSetupError
The associated error which can be returned from parsing.
impl StructuralPartialEq for Paper
Auto Trait Implementations§
impl Forget for Paper
impl Freeze for Paper
impl Move for Paper
impl RefUnwindSafe for Paper
impl Send for Paper
impl Sync for Paper
impl Unpin for Paper
impl UnsafeUnpin for Paper
impl UnwindSafe for Paper
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