[][src]Struct zeta::tracking::SourceProvider

pub struct SourceProvider {
    pub sources: HashMap<SourceID, Source>,
    pub source_id_counter: SourceID,
    pub problems: Vec<Problem>,
    pub error_count: usize,
    pub max_errors: usize,
    pub max_excerpt_lines: usize,
}

Fields

sources: HashMap<SourceID, Source>source_id_counter: SourceIDproblems: Vec<Problem>error_count: usizemax_errors: usizemax_excerpt_lines: usize

Methods

impl SourceProvider[src]

pub fn new() -> Self[src]

pub fn get_source_id_from_origin(&mut self, origin: &str) -> Option<SourceID>[src]

pub fn register_source_unchecked(&mut self, source: Source) -> SourceID[src]

pub fn register_source(&mut self, source: Source) -> SourceID[src]

pub fn load_source_file(
    &mut self,
    origin: &str
) -> Result<SourceReference, Error>
[src]

pub fn get_reference(&mut self, id: SourceID) -> SourceReference[src]

pub fn get_source(&self, source_id: SourceID) -> Option<&Source>[src]

pub fn get_source_mut(&mut self, source_id: SourceID) -> Option<&mut Source>[src]

pub fn message(
    &mut self,
    attribution: Option<SourceAttribution>,
    msg: String,
    msg_color: Option<&'static str>
)
[src]

pub fn warning(&mut self, attribution: SourceAttribution, msg: String)[src]

pub fn error(&mut self, attribution: SourceAttribution, msg: String)[src]

pub fn valid(&self) -> bool[src]

pub fn dump_all_warnings(&self, print_excerpts: bool)[src]

pub fn dump_all_errors(&self, print_excerpts: bool)[src]

pub fn dump_all_problems(&self, print_excerpts: bool)[src]

pub fn dump_warnings_for_source(
    &self,
    source_id: SourceID,
    print_excerpts: bool
)
[src]

pub fn dump_errors_for_source(&self, source_id: SourceID, print_excerpts: bool)[src]

pub fn dump_problems_for_source(
    &self,
    source_id: SourceID,
    print_excerpts: bool
)
[src]

pub fn clear_all_problems(&mut self)[src]

pub fn count_all_problems(&self) -> usize[src]

pub fn clear_problems_for_source(&mut self, source_id: SourceID)[src]

pub fn count_problems_for_source(&self, source_id: SourceID) -> usize[src]

Trait Implementations

impl Debug for SourceProvider[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]