Struct poloto::render::Header

source ·
pub struct Header<A> { /* private fields */ }
Expand description

Default svg header

Implementations§

source§

impl Header<()>

source

pub fn new() -> Self

source§

impl<A: Attr> Header<A>

source

pub fn with<AA: Attr>(self, attr: AA) -> Header<AA>

source

pub fn with_viewbox_width(self, width: f64) -> Self

source

pub fn get_viewbox(&self) -> [f64; 2]

source

pub fn with_dim(self, dim: [f64; 2]) -> Self

source

pub fn with_viewbox(self, viewbox: [f64; 2]) -> Self

source

pub fn light_theme(self) -> Append<Self, Theme<'static>>

source

pub fn dark_theme(self) -> Append<Self, Theme<'static>>

Trait Implementations§

source§

impl<A: Clone> Clone for Header<A>

source§

fn clone(&self) -> Header<A>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for Header<()>

source§

fn default() -> Self

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

impl<A: Attr> Elem for Header<A>

§

type Tail = ElementTail<&'static str>

source§

fn render_head(self, w: ElemWrite<'_>) -> Result<Self::Tail, Error>

source§

fn render_closure<K>( self, w: ElemWrite<'_>, func: impl FnOnce(ElemWrite<'_>) -> Result<K, Error> ) -> Result<K, Error>where Self: Sized,

👎Deprecated
source§

fn chain<R>(self, other: R) -> Chain<Self, R>where R: Elem, Self: Sized,

Render all of Self and head of other, store tail of other.
source§

fn append<R>(self, bottom: R) -> Append<Self, R>where R: Elem, Self: Sized,

Render head of Self, and all of other, store tail of self.
source§

fn inline(self) -> Inliner<Self>where Self: Sized,

Force this element and descendants to be written out inline.
source§

fn with_tab(self, new_tab: &'static str) -> WithTab<Self>where Self: Sized,

source§

fn some(self) -> Option<Self>where Self: Sized,

source§

impl<A: Copy> Copy for Header<A>

source§

impl<A> Locked for Header<A>

Auto Trait Implementations§

§

impl<A> RefUnwindSafe for Header<A>where A: RefUnwindSafe,

§

impl<A> Send for Header<A>where A: Send,

§

impl<A> Sync for Header<A>where A: Sync,

§

impl<A> Unpin for Header<A>where A: Unpin,

§

impl<A> UnwindSafe for Header<A>where A: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.