Skip to main content

PackageMetadata

Struct PackageMetadata 

Source
pub struct PackageMetadata {
    pub name: String,
    pub version: String,
    pub license: Option<String>,
    pub description: Option<String>,
    pub documentation: Option<String>,
    pub authors: Vec<String>,
    /* private fields */
}
Expand description

Package metadata that describe a crate

Fields§

§name: String

Name of the package

§version: String

Version of the package

§license: Option<String>

Package license

§description: Option<String>

Description of the package

§documentation: Option<String>

URL of the package documentation

§authors: Vec<String>

Authors of the package

Implementations§

Source§

impl PackageMetadata

Source

pub fn contain_metadata(&self, name: &str) -> bool

Know if a metadata key is present

Source

pub fn get_targets(&self, kind: &str) -> Option<Vec<String>>

Getter of the targets for a specific kind (bin, custom-build)

Source

pub fn is_prosa(&self) -> bool

Know if the package contain ProSA metadata

Source

pub fn get_prosa_proc_metadata(&self) -> Option<HashMap<&str, Metadata>>

Getter of the ProSA Processor or Adaptor if present

Source

pub fn get_prosa_main(&self) -> Vec<String>

Getter of the ProSA main list

Source

pub fn get_prosa_tvf(&self) -> Vec<String>

Getter of the ProSA TVF list

Source

pub fn get_main_version<'a>( &'a self, name: &str, ) -> Option<ComponentVersion<'a>>

Method to get the processor version from its name if it exist

Source

pub fn get_tvf_version<'a>(&'a self, name: &str) -> Option<ComponentVersion<'a>>

Method to get the processor version from its name if it exist

Source

pub fn get_proc_version<'a>( &'a self, name: &str, ) -> Option<ComponentVersion<'a>>

Method to get the processor version from its name if it exist

Source

pub fn get_adaptor_version<'a>( &'a self, name: &str, ) -> Option<ComponentVersion<'a>>

Method to get the adaptor version from its name if it exist

Source

pub fn j2_context(&self, ctx: &mut Context)

Method to add package metadata to a Jinja context

Trait Implementations§

Source§

impl Debug for PackageMetadata

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PackageMetadata

Source§

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 Display for PackageMetadata

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,