Struct svg::node::element::Element

source ·
pub struct Element { /* private fields */ }
Expand description

An element.

Implementations§

source§

impl Element

source

pub fn new<T>(name: T) -> Self
where T: Into<String>,

Create an element.

source

pub fn get_name(&self) -> &String

Return the name.

source

pub fn get_attributes(&self) -> &Attributes

Return the attributes.

source

pub fn get_attributes_mut(&mut self) -> &mut Attributes

Return the attributes as mutable.

source

pub fn get_children(&self) -> &Children

Return the children.

source

pub fn get_children_mut(&mut self) -> &mut Children

Return the children as mutable.

Trait Implementations§

source§

impl Clone for Element

source§

fn clone(&self) -> Element

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 Debug for Element

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Element

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Anchor> for Element

source§

fn from(value: Anchor) -> Self

Converts to this type from the input type.
source§

impl From<Animate> for Element

source§

fn from(value: Animate) -> Self

Converts to this type from the input type.
source§

impl From<AnimateColor> for Element

source§

fn from(value: AnimateColor) -> Self

Converts to this type from the input type.
source§

impl From<AnimateMotion> for Element

source§

fn from(value: AnimateMotion) -> Self

Converts to this type from the input type.
source§

impl From<AnimateTransform> for Element

source§

fn from(value: AnimateTransform) -> Self

Converts to this type from the input type.
source§

impl From<Circle> for Element

source§

fn from(value: Circle) -> Self

Converts to this type from the input type.
source§

impl From<ClipPath> for Element

source§

fn from(value: ClipPath) -> Self

Converts to this type from the input type.
source§

impl From<Definitions> for Element

source§

fn from(value: Definitions) -> Self

Converts to this type from the input type.
source§

impl From<Description> for Element

source§

fn from(value: Description) -> Self

Converts to this type from the input type.
source§

impl From<Ellipse> for Element

source§

fn from(value: Ellipse) -> Self

Converts to this type from the input type.
source§

impl From<Filter> for Element

source§

fn from(value: Filter) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectBlend> for Element

source§

fn from(value: FilterEffectBlend) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectColorMatrix> for Element

source§

fn from(value: FilterEffectColorMatrix) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectComponentTransfer> for Element

source§

fn from(value: FilterEffectComponentTransfer) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectComposite> for Element

source§

fn from(value: FilterEffectComposite) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectConvolveMatrix> for Element

source§

fn from(value: FilterEffectConvolveMatrix) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectDiffuseLighting> for Element

source§

fn from(value: FilterEffectDiffuseLighting) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectDisplacementMap> for Element

source§

fn from(value: FilterEffectDisplacementMap) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectDistantLight> for Element

source§

fn from(value: FilterEffectDistantLight) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectDropShadow> for Element

source§

fn from(value: FilterEffectDropShadow) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectFlood> for Element

source§

fn from(value: FilterEffectFlood) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectFunctionA> for Element

source§

fn from(value: FilterEffectFunctionA) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectFunctionB> for Element

source§

fn from(value: FilterEffectFunctionB) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectFunctionG> for Element

source§

fn from(value: FilterEffectFunctionG) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectFunctionR> for Element

source§

fn from(value: FilterEffectFunctionR) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectGaussianBlur> for Element

source§

fn from(value: FilterEffectGaussianBlur) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectImage> for Element

source§

fn from(value: FilterEffectImage) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectMerge> for Element

source§

fn from(value: FilterEffectMerge) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectMergeNode> for Element

source§

fn from(value: FilterEffectMergeNode) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectMorphology> for Element

source§

fn from(value: FilterEffectMorphology) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectOffset> for Element

source§

fn from(value: FilterEffectOffset) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectPointLight> for Element

source§

fn from(value: FilterEffectPointLight) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectSpecularLighting> for Element

source§

fn from(value: FilterEffectSpecularLighting) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectSpotLight> for Element

source§

fn from(value: FilterEffectSpotLight) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectTile> for Element

source§

fn from(value: FilterEffectTile) -> Self

Converts to this type from the input type.
source§

impl From<FilterEffectTurbulence> for Element

source§

fn from(value: FilterEffectTurbulence) -> Self

Converts to this type from the input type.
source§

impl From<ForeignObject> for Element

source§

fn from(value: ForeignObject) -> Self

Converts to this type from the input type.
source§

impl From<Group> for Element

source§

fn from(value: Group) -> Self

Converts to this type from the input type.
source§

impl From<Image> for Element

source§

fn from(value: Image) -> Self

Converts to this type from the input type.
source§

impl From<Line> for Element

source§

fn from(value: Line) -> Self

Converts to this type from the input type.
source§

impl From<LinearGradient> for Element

source§

fn from(value: LinearGradient) -> Self

Converts to this type from the input type.
source§

impl From<Link> for Element

source§

fn from(value: Link) -> Self

Converts to this type from the input type.
source§

impl From<Marker> for Element

source§

fn from(value: Marker) -> Self

Converts to this type from the input type.
source§

impl From<Mask> for Element

source§

fn from(value: Mask) -> Self

Converts to this type from the input type.
source§

impl From<MotionPath> for Element

source§

fn from(value: MotionPath) -> Self

Converts to this type from the input type.
source§

impl From<Path> for Element

source§

fn from(value: Path) -> Self

Converts to this type from the input type.
source§

impl From<Pattern> for Element

source§

fn from(value: Pattern) -> Self

Converts to this type from the input type.
source§

impl From<Polygon> for Element

source§

fn from(value: Polygon) -> Self

Converts to this type from the input type.
source§

impl From<Polyline> for Element

source§

fn from(value: Polyline) -> Self

Converts to this type from the input type.
source§

impl From<RadialGradient> for Element

source§

fn from(value: RadialGradient) -> Self

Converts to this type from the input type.
source§

impl From<Rectangle> for Element

source§

fn from(value: Rectangle) -> Self

Converts to this type from the input type.
source§

impl From<SVG> for Element

source§

fn from(value: SVG) -> Self

Converts to this type from the input type.
source§

impl From<Script> for Element

source§

fn from(value: Script) -> Self

Converts to this type from the input type.
source§

impl From<Stop> for Element

source§

fn from(value: Stop) -> Self

Converts to this type from the input type.
source§

impl From<Style> for Element

source§

fn from(value: Style) -> Self

Converts to this type from the input type.
source§

impl From<Symbol> for Element

source§

fn from(value: Symbol) -> Self

Converts to this type from the input type.
source§

impl From<TSpan> for Element

source§

fn from(value: TSpan) -> Self

Converts to this type from the input type.
source§

impl From<Text> for Element

source§

fn from(value: Text) -> Self

Converts to this type from the input type.
source§

impl From<TextPath> for Element

source§

fn from(value: TextPath) -> Self

Converts to this type from the input type.
source§

impl From<Title> for Element

source§

fn from(value: Title) -> Self

Converts to this type from the input type.
source§

impl From<Use> for Element

source§

fn from(value: Use) -> Self

Converts to this type from the input type.
source§

impl Node for Element

source§

fn append<T>(&mut self, node: T)
where T: Into<Box<dyn Node>>,

Append a child node.
source§

fn assign<T, U>(&mut self, name: T, value: U)
where T: Into<String>, U: Into<Value>,

Assign an attribute.

Auto Trait Implementations§

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> ToOwned for T
where 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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where 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 T
where 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.