pub struct Malware {
pub base: Malware,
pub mitre: MitreMalware,
}
Fields§
§base: Malware
§mitre: MitreMalware
Implementations§
Source§impl Malware
impl Malware
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Examples found in repository?
examples/actor_lookup.rs (line 20)
6fn display_actor<'a>(actor: &Node<'a, IntrusionSet>) {
7 println!("{} ({})", actor.name(), actor.id());
8 println!("============");
9
10 if let Some(description) = actor.description() {
11 println!("{}\n", description);
12 }
13
14 let mut malwares = actor.uses_malware().peekable();
15 if malwares.peek().is_some() {
16 println!("Malware:");
17 for malware in malwares {
18 match malware.resolve() {
19 Some(malware) => {
20 println!("- {} ({})", malware.name(), malware.id());
21 }
22 None => {
23 println!("- Unknown Malware");
24 }
25 }
26 }
27 }
28
29 let mut tools = actor.uses_tools().peekable();
30 if tools.peek().is_some() {
31 println!("Tools:");
32 for tool in tools {
33 match tool.resolve() {
34 Some(tool) => {
35 println!("- {} ({})", tool.name(), tool.id());
36 }
37 None => {
38 println!("- Unknown Tool");
39 }
40 }
41 }
42 }
43}
pub fn description(&self) -> Option<&str>
Trait Implementations§
Source§impl AsRef<CommonProperties> for Malware
impl AsRef<CommonProperties> for Malware
Source§fn as_ref(&self) -> &CommonProperties
fn as_ref(&self) -> &CommonProperties
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<'de> Deserialize<'de> for Malware
impl<'de> Deserialize<'de> for Malware
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
Auto Trait Implementations§
impl Freeze for Malware
impl RefUnwindSafe for Malware
impl Send for Malware
impl Sync for Malware
impl Unpin for Malware
impl UnwindSafe for Malware
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