Skip to main content

Writer

Struct Writer 

Source
pub struct Writer {
Show 21 fields pub b: BasicPdfWriter, pub p: Page, pub fonts: Vec<Box<dyn Font>>, pub cur_font: usize, pub font_size: i16, pub sup: i16, pub mode: Mode, pub title: String, pub pages: Vec<Page>, pub new_page: bool, pub line_pad: i16, pub margin_left: i16, pub margin_right: i16, pub margin_top: i16, pub margin_bottom: i16, pub page_width: i16, pub page_height: i16, pub line_used: i16, pub line: Vec<Item>, pub max_font_size: i16, pub center: i16,
}
Expand description

Fields§

§b: BasicPdfWriter
§p: Page
§fonts: Vec<Box<dyn Font>>
§cur_font: usize
§font_size: i16
§sup: i16
§mode: Mode
§title: String
§pages: Vec<Page>
§new_page: bool
§line_pad: i16
§margin_left: i16
§margin_right: i16
§margin_top: i16
§margin_bottom: i16
§page_width: i16
§page_height: i16
§line_used: i16
§line: Vec<Item>
§max_font_size: i16
§center: i16

Implementations§

Source§

impl Writer

Source

pub fn save_page(&mut self)

Source

pub fn output_line(&mut self)

Source

pub fn text(&mut self, s: &str)

Source

pub fn space(&mut self)

Source

pub fn set_sup(&mut self, sup: i16)

Source

pub fn finish(&mut self)

Trait Implementations§

Source§

impl Default for Writer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.