pub enum AttributeValue {
Numeric(f64),
Boolean(bool),
String(String),
}Expand description
A single attribute value attached to a graph, vertex, or edge.
use rust_igraph::AttributeValue;
let v = AttributeValue::Numeric(3.14);
assert!(v.as_f64().is_some());
assert!(v.as_str().is_none());Variants§
Numeric(f64)
Floating-point number (mirrors IGRAPH_ATTRIBUTE_NUMERIC).
Boolean(bool)
Boolean (mirrors IGRAPH_ATTRIBUTE_BOOLEAN).
String(String)
UTF-8 string (mirrors IGRAPH_ATTRIBUTE_STRING).
Implementations§
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 · 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 PartialEq for AttributeValue
impl PartialEq for AttributeValue
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