use std::sync::Arc;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq)]
pub struct Svg {
svg_contents: Arc<str>,
}
impl std::fmt::Debug for Svg {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Svg")
.field("svg_contents", &self.svg_contents)
.finish()
}
}
impl Svg {
pub fn new(contents: impl Into<Arc<str>>) -> Self {
Self {
svg_contents: contents.into(),
}
}
pub fn contents(&self) -> &Arc<str> {
&self.svg_contents
}
}