[librsvg: 6/11] Add Element.get_attributes()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 6/11] Add Element.get_attributes()
- Date: Thu, 10 Sep 2020 17:45:22 +0000 (UTC)
commit 73e528b4970ac37a77b5e08d33ee64e3ba15df89
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Sep 4 20:03:59 2020 -0500
Add Element.get_attributes()
rsvg_internals/src/element.rs | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/rsvg_internals/src/element.rs b/rsvg_internals/src/element.rs
index b3a0a50f..50cdf51f 100644
--- a/rsvg_internals/src/element.rs
+++ b/rsvg_internals/src/element.rs
@@ -115,6 +115,10 @@ impl<T: SetAttributes + Draw> ElementInner<T> {
&self.element_name
}
+ fn get_attributes(&self) -> &Attributes {
+ &self.attributes
+ }
+
fn get_id(&self) -> Option<&str> {
self.id.as_deref()
}
@@ -513,6 +517,10 @@ impl Element {
call_inner!(self, element_name)
}
+ pub fn get_attributes(&self) -> &Attributes {
+ call_inner!(self, get_attributes)
+ }
+
pub fn get_id(&self) -> Option<&str> {
call_inner!(self, get_id)
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]