pub enum AttributeValue {
Numeric(f64),
Boolean(bool),
String(String),
}Expand description
A single attribute value, as stored by the C attribute handler.
It converts from f64, i32, i64, bool, &str and String, so the
generic setters such as Graph::set_vertex_attr accept those directly.
Variants§
Implementations§
Source§impl AttributeValue
impl AttributeValue
Sourcepub fn attribute_type(&self) -> AttributeType
pub fn attribute_type(&self) -> AttributeType
The AttributeType of this value.
Trait Implementations§
Source§impl Clone for AttributeValue
impl Clone for AttributeValue
Source§fn clone(&self) -> AttributeValue
fn clone(&self) -> AttributeValue
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 AttributeValue
impl Debug for AttributeValue
Source§impl Display for AttributeValue
impl Display for AttributeValue
Source§impl From<&str> for AttributeValue
impl From<&str> for AttributeValue
Source§impl From<String> for AttributeValue
impl From<String> for AttributeValue
Source§impl From<bool> for AttributeValue
impl From<bool> for AttributeValue
Source§impl From<f64> for AttributeValue
impl From<f64> for AttributeValue
Source§impl From<i32> for AttributeValue
impl From<i32> for AttributeValue
Source§impl From<i64> for AttributeValue
impl From<i64> for AttributeValue
Source§impl PartialEq for AttributeValue
impl PartialEq for AttributeValue
Source§fn eq(&self, other: &AttributeValue) -> bool
fn eq(&self, other: &AttributeValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AttributeValue
Auto Trait Implementations§
impl Freeze for AttributeValue
impl RefUnwindSafe for AttributeValue
impl Send for AttributeValue
impl Sync for AttributeValue
impl Unpin for AttributeValue
impl UnsafeUnpin for AttributeValue
impl UnwindSafe for AttributeValue
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