Struct dprint_core::formatting::Condition [−][src]
pub struct Condition { /* fields omitted */ }
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
impl Condition
[src]
impl Condition
[src]pub fn new(name: &'static str, properties: ConditionProperties) -> Condition
[src]
pub fn new_true() -> Condition
[src]
pub fn new_false() -> Condition
[src]
pub fn new_with_dependent_infos(
name: &'static str,
properties: ConditionProperties,
dependent_infos: Vec<Info>
) -> Condition
[src]
name: &'static str,
properties: ConditionProperties,
dependent_infos: Vec<Info>
) -> Condition
pub fn get_unique_id(&self) -> usize
[src]
pub fn get_name(&self) -> &'static str
[src]
pub fn get_true_path(&self) -> &Option<PrintItemPath>
[src]
pub fn get_false_path(&self) -> &Option<PrintItemPath>
[src]
pub fn get_reference(&mut self) -> ConditionReference
[src]
Trait Implementations
impl Into<PrintItems> for Condition
[src]
impl Into<PrintItems> for Condition
[src]fn into(self) -> PrintItems
[src]
fn into(self) -> PrintItems
[src]Performs the conversion.
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more