Trait cpe::cpe::Cpe

source ·
pub trait Cpe {
    // Required methods
    fn part(&self) -> CpeType;
    fn vendor(&self) -> Component<'_>;
    fn product(&self) -> Component<'_>;
    fn version(&self) -> Component<'_>;
    fn update(&self) -> Component<'_>;
    fn edition(&self) -> Component<'_>;
    fn language(&self) -> &Language;
    fn sw_edition(&self) -> Component<'_>;
    fn target_sw(&self) -> Component<'_>;
    fn target_hw(&self) -> Component<'_>;
    fn other(&self) -> Component<'_>;
}
Expand description

Generic accesss to fields in a Uri or Wfn (either owned or borrowed). If you have a borrowed Uri or Wfn, it is prefereble to use the methods from the struct directly instead of this trait, as they return a &Component instead of Component, and in the case that the string value of a component required decoding, using this trait may result in a string clone.

Required Methods§

source

fn part(&self) -> CpeType

source

fn vendor(&self) -> Component<'_>

source

fn product(&self) -> Component<'_>

source

fn version(&self) -> Component<'_>

source

fn update(&self) -> Component<'_>

source

fn edition(&self) -> Component<'_>

source

fn language(&self) -> &Language

source

fn sw_edition(&self) -> Component<'_>

source

fn target_sw(&self) -> Component<'_>

source

fn target_hw(&self) -> Component<'_>

source

fn other(&self) -> Component<'_>

Implementors§

source§

impl Cpe for OwnedUri

source§

impl Cpe for Uri<'_>

source§

impl Cpe for OwnedWfn

source§

impl Cpe for Wfn<'_>