pub struct ExperimentalOption { /* private fields */ }Expand description
Experimental option (aka feature flag).
This struct holds one experimental option that can change some part of Nushell’s behavior. These options let users opt in or out of experimental changes while keeping the rest stable. They’re useful for testing new ideas and giving users a way to go back to older behavior if needed.
You can find all options in the statics of nu_experimental.
Everything there, except ALL, is a toggleable option.
ALL gives a full list and can be used to check which options are set.
The Debug implementation shows the option’s identifier, stability, and current value.
To also include the description in the output, use the
plus sign, e.g. format!("{OPTION:+#?}").
Implementations§
Source§impl ExperimentalOption
impl ExperimentalOption
pub fn identifier(&self) -> &'static str
pub fn description(&self) -> &'static str
pub fn status(&self) -> Status
pub fn since(&self) -> (u16, u16, u16)
pub fn issue_id(&self) -> u32
pub fn issue_url(&self) -> String
pub fn get(&self) -> bool
Sourcepub unsafe fn set(&self, value: bool)
pub unsafe fn set(&self, value: bool)
Sets the state of an experimental option.
§Safety
This method is unsafe to emphasize that experimental options are not designed to change dynamically at runtime. Changing their state at arbitrary points can lead to inconsistent behavior. You should set experimental options only during initialization, before the application fully starts.
Trait Implementations§
Source§impl Debug for ExperimentalOption
impl Debug for ExperimentalOption
Source§impl PartialEq for ExperimentalOption
impl PartialEq for ExperimentalOption
impl Eq for ExperimentalOption
Auto Trait Implementations§
impl !Freeze for ExperimentalOption
impl !RefUnwindSafe for ExperimentalOption
impl Send for ExperimentalOption
impl Sync for ExperimentalOption
impl Unpin for ExperimentalOption
impl !UnwindSafe for ExperimentalOption
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more