Skip to main content

ShellVariable

Trait ShellVariable 

Source
pub trait ShellVariable: AsRef<str> {
    // Required method
    fn name(&self) -> &str;

    // Provided methods
    fn optional(&self) -> Option<String> { ... }
    fn required(&self) -> Result<String> { ... }
    fn expand(&self) -> Option<String> { ... }
    fn to_vec(&self) -> Option<Vec<String>> { ... }
    fn bind<S: AsRef<str>>(
        &mut self,
        value: S,
        flags: Option<Assign>,
        attrs: Option<Attr>,
    ) -> Result<ExecStatus> { ... }
    fn bind_global<S: AsRef<str>>(
        &mut self,
        value: S,
        flags: Option<Assign>,
        attrs: Option<Attr>,
    ) -> Result<ExecStatus> { ... }
    fn unbind(&mut self) -> Result<ExecStatus> { ... }
    fn append<S: AsRef<str>>(&mut self, s: S) -> Result<ExecStatus> { ... }
    fn is_array(&self) -> bool { ... }
    fn is_readonly(&self) -> bool { ... }
}

Required Methods§

Source

fn name(&self) -> &str

Provided Methods§

Source

fn optional(&self) -> Option<String>

Source

fn required(&self) -> Result<String>

Source

fn expand(&self) -> Option<String>

Source

fn to_vec(&self) -> Option<Vec<String>>

Source

fn bind<S: AsRef<str>>( &mut self, value: S, flags: Option<Assign>, attrs: Option<Attr>, ) -> Result<ExecStatus>

Source

fn bind_global<S: AsRef<str>>( &mut self, value: S, flags: Option<Assign>, attrs: Option<Attr>, ) -> Result<ExecStatus>

Source

fn unbind(&mut self) -> Result<ExecStatus>

Source

fn append<S: AsRef<str>>(&mut self, s: S) -> Result<ExecStatus>

Source

fn is_array(&self) -> bool

Source

fn is_readonly(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§