pub enum Dialect {
Posix,
Fish,
}Expand description
The shell dialect an export is written for.
Variants§
Implementations§
Source§impl Dialect
impl Dialect
Sourcepub fn parse(name: &str) -> Option<Self>
pub fn parse(name: &str) -> Option<Self>
Parse a dialect by name; None for a shell this does not write.
use majordomus_cli::environment::shell::Dialect;
assert_eq!(Dialect::parse("direnv"), Some(Dialect::Posix));
assert_eq!(Dialect::parse("bash"), Some(Dialect::Posix));
assert_eq!(Dialect::parse("fish"), Some(Dialect::Fish));
assert_eq!(Dialect::parse("powershell"), None);Trait Implementations§
impl Copy for Dialect
impl Eq for Dialect
impl StructuralPartialEq for Dialect
Auto Trait Implementations§
impl Freeze for Dialect
impl RefUnwindSafe for Dialect
impl Send for Dialect
impl Sync for Dialect
impl Unpin for Dialect
impl UnsafeUnpin for Dialect
impl UnwindSafe for Dialect
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.