pub struct VarSource;Expand description
This sources values from the environment variables set by the CI in
crate::tools::git_hosting_provs::HostingType::GitLab.
Trait Implementations§
Source§impl VarSource for VarSource
impl VarSource for VarSource
Source§fn is_usable(&self, _environment: &mut Environment) -> bool
fn is_usable(&self, _environment: &mut Environment) -> bool
Indicates whether this source of variables is usable.
It might not be usable if the underlying data-source (e.g. a file) does not exist,
or is not reachable (e.g. a web URL).
Source§fn hierarchy(&self) -> Hierarchy
fn hierarchy(&self) -> Hierarchy
Used to evaluate whether we preffer this sources values
over the ones of an other.
This is used for sorting.
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
The name of this type.
This is used for display and sorting.
Source§fn properties(&self) -> &Vec<String>
fn properties(&self) -> &Vec<String>
The properties (usually parameters to
Self::new)
of the particular instance of an object of this trait.
This is used for display and sorting.Source§fn retrieve(&self, environment: &mut Environment, key: Key) -> RetrieveRes
fn retrieve(&self, environment: &mut Environment, key: Key) -> RetrieveRes
Tries to retrieve the value of a single
key. Read moreSource§fn display(&self) -> String
fn display(&self) -> String
As I failed to implement
fmt::Display for all implementing structs
in one impl, I took this road, which works for our case.Source§fn version_from_build_tag(
&self,
environment: &mut Environment,
key: Key,
) -> RetrieveRes
fn version_from_build_tag( &self, environment: &mut Environment, key: Key, ) -> RetrieveRes
Uses an already found build-tag as the version field,
if available. Read more
Auto Trait Implementations§
impl Freeze for VarSource
impl RefUnwindSafe for VarSource
impl Send for VarSource
impl Sync for VarSource
impl Unpin for VarSource
impl UnwindSafe for VarSource
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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