Enum SuggestedCode
pub enum SuggestedCode {
Code(String),
FormatString(String, Vec<SourceLocation>),
}Expand description
Suggested code.
Variants§
Code(String)
Suggested code as a string.
FormatString(String, Vec<SourceLocation>)
A rudimentary and custom format string into which source code is inserted during diagnostic printing.
The original source code for each SourceLocation in the vector is inserted in the format string by
replacing $$<index> tokens, where index is 1-based.
E.g. “(char)($$1) = $$2”, vec![loc, another]
Trait Implementations§
§impl Clone for SuggestedCode
impl Clone for SuggestedCode
§fn clone(&self) -> SuggestedCode
fn clone(&self) -> SuggestedCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SuggestedCode
impl RefUnwindSafe for SuggestedCode
impl Send for SuggestedCode
impl Sync for SuggestedCode
impl Unpin for SuggestedCode
impl UnwindSafe for SuggestedCode
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