pub struct PlumbingRules { /* private fields */ }Expand description
An ordered list of plumbing rules to use whenever something is “loaded” within the editor.
Implementations§
Source§impl PlumbingRules
impl PlumbingRules
Sourcepub fn try_load() -> Result<Self, String>
pub fn try_load() -> Result<Self, String>
Attempt to load plumbing rules from the default location
Sourcepub fn plumb(&mut self, msg: PlumbingMessage) -> Option<MatchOutcome>
pub fn plumb(&mut self, msg: PlumbingMessage) -> Option<MatchOutcome>
Run the provided message through the plumbing rules to determine how it should be handled. If no rules match then None is returned and default handling for a load takes place instead. The returned message may differ from the one passed in if rules carry out rewrites.
Trait Implementations§
Source§impl Debug for PlumbingRules
impl Debug for PlumbingRules
Source§impl Default for PlumbingRules
impl Default for PlumbingRules
Source§fn default() -> PlumbingRules
fn default() -> PlumbingRules
Returns the “default value” for a type. Read more
Source§impl FromStr for PlumbingRules
impl FromStr for PlumbingRules
Source§impl PartialEq for PlumbingRules
impl PartialEq for PlumbingRules
impl Eq for PlumbingRules
impl StructuralPartialEq for PlumbingRules
Auto Trait Implementations§
impl Freeze for PlumbingRules
impl RefUnwindSafe for PlumbingRules
impl !Send for PlumbingRules
impl !Sync for PlumbingRules
impl Unpin for PlumbingRules
impl UnwindSafe for PlumbingRules
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
Mutably borrows from an owned value. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.