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) -> Condition
pub fn new_true() -> Condition
pub fn new_false() -> Condition
pub fn new_with_dependent_infos(
name: &'static str,
properties: ConditionProperties,
dependent_infos: Vec<Info>
) -> Condition
pub fn get_unique_id(&self) -> usize
pub fn get_name(&self) -> &'static str
pub fn get_true_path(&self) -> &Option<PrintItemPath>
pub fn get_false_path(&self) -> &Option<PrintItemPath>
pub fn get_reference(&mut self) -> ConditionReference
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