pub struct Vertex { /* private fields */ }Implementations§
Source§impl Vertex
impl Vertex
pub fn new(key: VertexKey, value: VertexValue) -> Self
pub fn key_ref(&self) -> &VertexKeyRef
pub fn value_ref(&self) -> &VertexValue
pub fn value(self) -> VertexValue
pub fn update_value(&mut self, new_value: VertexValue)
pub fn update_key(&mut self, new_key: VertexKey)
Trait Implementations§
Source§impl From<(String, VertexValue)> for Vertex
let vertex: Vertex = (String::from("Vertex key"), 1u8.into()).into();
assert_eq!(vertex.key_ref().to_owned(), String::from("Vertex key"));
assert_eq!(vertex.value(), 1u8.into());
impl From<(String, VertexValue)> for Vertex
let vertex: Vertex = (String::from("Vertex key"), 1u8.into()).into();
assert_eq!(vertex.key_ref().to_owned(), String::from("Vertex key"));
assert_eq!(vertex.value(), 1u8.into());Source§fn from(as_tuple: (VertexKey, VertexValue)) -> Self
fn from(as_tuple: (VertexKey, VertexValue)) -> Self
Converts to this type from the input type.
Source§impl PartialOrd for Vertex
impl PartialOrd for Vertex
impl StructuralPartialEq for Vertex
Auto Trait Implementations§
impl Freeze for Vertex
impl RefUnwindSafe for Vertex
impl Send for Vertex
impl Sync for Vertex
impl Unpin for Vertex
impl UnsafeUnpin for Vertex
impl UnwindSafe for Vertex
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more