Struct dprint_core::formatting::Condition
source · [−]pub struct Condition { /* private fields */ }
Expand description
Conditionally print items based on a condition.
These conditions are extremely flexible and can even be resolved based on information found later on in the file.
Implementations
sourceimpl Condition
impl Condition
pub fn new(name: &'static str, properties: ConditionProperties) -> Self
pub fn new_true() -> Self
pub fn new_false() -> Self
pub fn unique_id(&self) -> u32
pub fn name(&self) -> &'static str
pub fn true_path(&self) -> &Option<PrintItemPath>
pub fn false_path(&self) -> &Option<PrintItemPath>
pub fn create_reference(&mut self) -> ConditionReference
pub fn create_reevaluation(&mut self) -> ConditionReevaluation
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Condition
impl !Send for Condition
impl !Sync for Condition
impl Unpin for Condition
impl !UnwindSafe for Condition
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more