zed/crates/ui2/src/disableable.rs
Marshall Bowers 3e2c517dd1
Add Disableable trait (#3439)
This PR adds a new `Disableable` trait to use for elements that are
capable of being disabled.

Release Notes:

- N/A
2023-11-29 13:01:26 -05:00

5 lines
166 B
Rust

/// A trait for elements that can be disabled.
pub trait Disableable {
/// Sets whether the element is disabled.
fn disabled(self, disabled: bool) -> Self;
}