Skip to main content

Spannable

Trait Spannable 

Source
pub trait Spannable {
    // Required method
    fn span(&self) -> Span;

    // Provided method
    fn set_span(&mut self, _span: Span) { ... }
}
Expand description

Trait for objects that provide Span information. Used for error messaging.

Required Methods§

Source

fn span(&self) -> Span

Get the Span of the object

Provided Methods§

Source

fn set_span(&mut self, _span: Span)

Set the Span of the object. Possibly does nothing as implementation is optional.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§