pub struct DynamicNode {
pub properties: HashMap<String, NodeProperty>,
pub node_key: String,
pub node_type: String,
pub seen_at: u64,
pub asset_id: Option<String>,
pub hostname: Option<String>,
pub host_ip: Option<String>,
pub id_strategy: Vec<IdStrategy>,
}
Fields§
§properties: HashMap<String, NodeProperty>
§node_key: String
§node_type: String
§seen_at: u64
§asset_id: Option<String>
§hostname: Option<String>
§host_ip: Option<String>
§id_strategy: Vec<IdStrategy>
Implementations§
Source§impl DynamicNode
impl DynamicNode
pub fn set_property( &mut self, name: impl Into<String>, value: impl Into<NodeProperty>, )
pub fn set_key(&mut self, key: String)
pub fn into_json(self) -> Value
pub fn get_id_strategies(&self) -> &[IdStrategy]
pub fn requires_asset_identification(&self) -> bool
Trait Implementations§
Source§impl Clone for DynamicNode
impl Clone for DynamicNode
Source§fn clone(&self) -> DynamicNode
fn clone(&self) -> DynamicNode
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 DynamicNode
impl Debug for DynamicNode
Source§impl Default for DynamicNode
impl Default for DynamicNode
Source§fn default() -> DynamicNode
fn default() -> DynamicNode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DynamicNode
impl<'de> Deserialize<'de> for DynamicNode
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
Source§impl From<DynamicNode> for Node
impl From<DynamicNode> for Node
Source§fn from(dynamic_node: DynamicNode) -> Self
fn from(dynamic_node: DynamicNode) -> Self
Converts to this type from the input type.
Source§impl Message for DynamicNode
impl Message for DynamicNode
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.Source§impl NodeT for DynamicNode
impl NodeT for DynamicNode
fn get_asset_id(&self) -> Option<&str>
fn set_asset_id(&mut self, asset_id: impl Into<String>)
fn get_node_key(&self) -> &str
fn set_node_key(&mut self, node_key: impl Into<String>)
fn merge(&mut self, other: &Self) -> bool
fn merge_into(&mut self, other: Self) -> bool
fn clone_asset_id(&self) -> Option<String>
fn clone_node_key(&self) -> String
Source§impl PartialEq for DynamicNode
impl PartialEq for DynamicNode
Source§impl Serialize for DynamicNode
impl Serialize for DynamicNode
impl Eq for DynamicNode
impl StructuralPartialEq for DynamicNode
Auto Trait Implementations§
impl Freeze for DynamicNode
impl RefUnwindSafe for DynamicNode
impl Send for DynamicNode
impl Sync for DynamicNode
impl Unpin for DynamicNode
impl UnwindSafe for DynamicNode
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