pub struct SetEnvironment<'a> {
pub expand: bool,
pub hidden: bool,
pub global: bool,
pub remove: bool,
pub unset: bool,
pub target_session: Option<Cow<'a, str>>,
pub name: Option<Cow<'a, str>>,
pub value: Option<Cow<'a, str>>,
}
Expand description
Structure for setting or unsetting an environment variable
§Manual
tmux ^3.2:
set-environment [-Fhgru] [-t target-session] name [value]
(alias: setenv)
tmux ^1.0:
set-environment [-gru] [-t target-session] name [value]
(alias: setenv)
Fields§
§expand: bool
[-F]
- value is expanded as a format
[-h]
- marks the variable as hidden
global: bool
[-g]
- make change in the global environment
remove: bool
[-r]
- remove the variable from the environment before starting a new process
unset: bool
[-u]
- unset a variable
target_session: Option<Cow<'a, str>>
[-t target-session]
- target-session
name: Option<Cow<'a, str>>
name
value: Option<Cow<'a, str>>
[value]
- specify the value
Implementations§
Source§impl<'a> SetEnvironment<'a>
impl<'a> SetEnvironment<'a>
pub fn new() -> Self
[-h]
- marks the variable as hidden
Sourcepub fn remove(self) -> Self
pub fn remove(self) -> Self
[-r]
- remove the variable from the environment before starting a new process
Sourcepub fn target_session<S: Into<Cow<'a, str>>>(self, target_session: S) -> Self
pub fn target_session<S: Into<Cow<'a, str>>>(self, target_session: S) -> Self
[-t target-session]
- target-session
pub fn build(self) -> TmuxCommand<'a>
Trait Implementations§
Source§impl<'a> Clone for SetEnvironment<'a>
impl<'a> Clone for SetEnvironment<'a>
Source§fn clone(&self) -> SetEnvironment<'a>
fn clone(&self) -> SetEnvironment<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for SetEnvironment<'a>
impl<'a> Debug for SetEnvironment<'a>
Source§impl<'a> Default for SetEnvironment<'a>
impl<'a> Default for SetEnvironment<'a>
Source§fn default() -> SetEnvironment<'a>
fn default() -> SetEnvironment<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> From<SetEnvironment<'a>> for TmuxCommand<'a>
impl<'a> From<SetEnvironment<'a>> for TmuxCommand<'a>
Source§fn from(item: SetEnvironment<'a>) -> Self
fn from(item: SetEnvironment<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> Hash for SetEnvironment<'a>
impl<'a> Hash for SetEnvironment<'a>
Source§impl<'a> Ord for SetEnvironment<'a>
impl<'a> Ord for SetEnvironment<'a>
Source§fn cmp(&self, other: &SetEnvironment<'a>) -> Ordering
fn cmp(&self, other: &SetEnvironment<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialEq for SetEnvironment<'a>
impl<'a> PartialEq for SetEnvironment<'a>
Source§impl<'a> PartialOrd for SetEnvironment<'a>
impl<'a> PartialOrd for SetEnvironment<'a>
impl<'a> Eq for SetEnvironment<'a>
impl<'a> StructuralPartialEq for SetEnvironment<'a>
Auto Trait Implementations§
impl<'a> Freeze for SetEnvironment<'a>
impl<'a> RefUnwindSafe for SetEnvironment<'a>
impl<'a> Send for SetEnvironment<'a>
impl<'a> Sync for SetEnvironment<'a>
impl<'a> Unpin for SetEnvironment<'a>
impl<'a> UnwindSafe for SetEnvironment<'a>
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