pub struct GraphvizImage {
pub path: String,
pub width: String,
pub height: String,
}Expand description
Defines the path, width, and height of an image for GraphViz.
Without this, the <image> element is not rendered for a node.
See Image.
Fields§
§path: StringURL to the image. This may be a data URL.
§Examples
Hyperlinked image:
https://example.com/image.pngInline image:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZBAMAAAA2x5hQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAADUExURUeK/z7BOdMAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAOSURBVCjPYxgFNAMMDAABXgABAvs87wAAAABJRU5ErkJggg==width: StringWidth that GraphViz scales the image, e.g. "50px".
height: StringHeight that GraphViz scales the image, e.g. "50px".
Implementations§
Source§impl GraphvizImage
impl GraphvizImage
Sourcepub fn path(&self) -> &str
pub fn path(&self) -> &str
Returns the URL to the image. This may be a data URL.
§Examples
Hyperlinked image:
https://example.com/image.pngInline image:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZBAMAAAA2x5hQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAADUExURUeK/z7BOdMAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAOSURBVCjPYxgFNAMMDAABXgABAvs87wAAAABJRU5ErkJggg==Trait Implementations§
Source§impl Clone for GraphvizImage
impl Clone for GraphvizImage
Source§fn clone(&self) -> GraphvizImage
fn clone(&self) -> GraphvizImage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphvizImage
impl Debug for GraphvizImage
Source§impl<'de> Deserialize<'de> for GraphvizImage
impl<'de> Deserialize<'de> for GraphvizImage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GraphvizImage
Source§impl PartialEq for GraphvizImage
impl PartialEq for GraphvizImage
Source§impl Serialize for GraphvizImage
impl Serialize for GraphvizImage
impl StructuralPartialEq for GraphvizImage
Auto Trait Implementations§
impl Freeze for GraphvizImage
impl RefUnwindSafe for GraphvizImage
impl Send for GraphvizImage
impl Sync for GraphvizImage
impl Unpin for GraphvizImage
impl UnsafeUnpin for GraphvizImage
impl UnwindSafe for GraphvizImage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.