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§
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".