Struct eve::Eve [−][src]
pub struct Eve;
A struct to allow replacement of text with environment variables.
Methods
impl Eve
[src]
impl Eve
pub fn new() -> Result<Self, Error>
[src]
pub fn new() -> Result<Self, Error>
Creates a new Eve
using environment variables from ./.env
.
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Error>
[src]
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Creates a new Eve
using environment variables from the path specified
by the path
variables.
pub fn replace<'e, 's>(&'e self, text: &'s str) -> Result<Cow<'s, str>, Error>
[src]
pub fn replace<'e, 's>(&'e self, text: &'s str) -> Result<Cow<'s, str>, Error>
Perform a replacement on the provided text
.
Trait Implementations
impl Clone for Eve
[src]
impl Clone for Eve
fn clone(&self) -> Eve
[src]
fn clone(&self) -> Eve
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Eve
[src]
impl Copy for Eve
impl Debug for Eve
[src]
impl Debug for Eve
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Replacer for Eve
[src]
impl Replacer for Eve
fn replace_append(&mut self, caps: &Captures, dst: &mut String)
[src]
fn replace_append(&mut self, caps: &Captures, dst: &mut String)
Appends text to dst
to replace the current match. Read more
fn no_expansion(&'r mut self) -> Option<Cow<'r, str>>
[src]
fn no_expansion(&'r mut self) -> Option<Cow<'r, str>>
Return a fixed unchanging replacement string. Read more
fn by_ref(&'r mut self) -> ReplacerRef<'r, Self>
[src]
fn by_ref(&'r mut self) -> ReplacerRef<'r, Self>
Return a Replacer
that borrows and wraps this Replacer
. Read more