Skip to main content

Line

Struct Line 

Source
pub struct Line<'t> { /* private fields */ }
Expand description

<line>: Line SVG element

Implementations§

Source§

impl<'t> Line<'t>

<line> items

Source

pub fn x1<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add x1 attribute

Source

pub fn y1<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add y1 attribute

Source

pub fn x2<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add x2 attribute

Source

pub fn y2<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add y2 attribute

Source

pub fn path_length<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add pathLength attribute

Source

pub fn required_extensions<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add requiredExtensions attribute

Source

pub fn system_language<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add systemLanguage attribute

Source

pub fn desc(&mut self) -> Desc<'_>

Add Desc child element

Source

pub fn metadata(&mut self) -> Metadata<'_>

Add Metadata child element

Source

pub fn title(&mut self) -> Title<'_>

Add Title child element

Source

pub fn animate(&mut self) -> Animate<'_>

Add Animate child element

Source

pub fn animate_motion(&mut self) -> AnimateMotion<'_>

Add AnimateMotion child element

Source

pub fn animate_transform(&mut self) -> AnimateTransform<'_>

Add AnimateTransform child element

Source

pub fn mpath(&mut self) -> MPath<'_>

Add MPath child element

Source

pub fn set(&mut self) -> Set<'_>

Add Set child element

Source

pub fn stroke<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add stroke attribute

Source

pub fn comment<'v, V>(&mut self, com: V) -> &mut Self
where V: Into<Value<'v>>,

Add a comment

These characters will be replaced with entities:

CharEntity
-&hyphen;
<&lt;
>&gt;
Source

pub fn raw(&mut self, trusted: impl AsRef<str>) -> &mut Self

Add raw content

WARNING: trusted is used verbatim, with no escaping; do not call with untrusted content.

Source

pub fn close(&'t mut self) -> &'t mut Tree

Close the element

  • Closes all child elements
  • Adds the closing tag if necessary (e.g. </line>)
Source§

impl<'t> Line<'t>

Global SVG attributes

Source

pub fn id<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add id attribute

Source

pub fn class<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add class attribute

Source

pub fn style<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add style attribute

Source

pub fn autofocus(&mut self) -> &mut Self

Add autofocus Boolean attribute

Source

pub fn lang<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add lang attribute

Source

pub fn tabindex<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add tabindex attribute

Source

pub fn transform<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add transform attribute

Source

pub fn data_<'a, V>(&mut self, name: &str, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add data-* attribute

Auto Trait Implementations§

§

impl<'t> Freeze for Line<'t>

§

impl<'t> RefUnwindSafe for Line<'t>

§

impl<'t> Send for Line<'t>

§

impl<'t> Sync for Line<'t>

§

impl<'t> Unpin for Line<'t>

§

impl<'t> UnsafeUnpin for Line<'t>

§

impl<'t> !UnwindSafe for Line<'t>

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.