pub struct RuleExampleSource { /* private fields */ }Expand description
One source in an executable lint example. resolves_to names another source
in the same example program and is used only when module semantics require it.
Implementations§
Source§impl RuleExampleSource
impl RuleExampleSource
pub const fn new(script_kind: ScriptKind, text: &'static str) -> Self
pub const fn resolving_to(self, source: usize) -> Self
pub const fn script_kind(self) -> ScriptKind
pub const fn text(self) -> &'static str
pub const fn resolves_to(self) -> Option<usize>
Trait Implementations§
Source§impl Clone for RuleExampleSource
impl Clone for RuleExampleSource
Source§fn clone(&self) -> RuleExampleSource
fn clone(&self) -> RuleExampleSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RuleExampleSource
Source§impl Debug for RuleExampleSource
impl Debug for RuleExampleSource
impl Eq for RuleExampleSource
Source§impl Hash for RuleExampleSource
impl Hash for RuleExampleSource
Source§impl PartialEq for RuleExampleSource
impl PartialEq for RuleExampleSource
impl StructuralPartialEq for RuleExampleSource
Auto Trait Implementations§
impl Freeze for RuleExampleSource
impl RefUnwindSafe for RuleExampleSource
impl Send for RuleExampleSource
impl Sync for RuleExampleSource
impl Unpin for RuleExampleSource
impl UnsafeUnpin for RuleExampleSource
impl UnwindSafe for RuleExampleSource
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