Struct Analysis

Source
pub struct Analysis {
    pub revisions: Vec<RevisionAnalysis>,
    pub paragraphs: Vec<ParagraphAnalysis>,
    pub sentences: Vec<SentenceAnalysis>,
    pub words: Vec<WordAnalysis>,
    pub spam_ids: Vec<i32>,
    pub revisions_by_id: HashMap<i32, RevisionPointer>,
    pub ordered_revisions: Vec<RevisionPointer>,
    pub current_revision: RevisionPointer,
    /* private fields */
}

Fields§

§revisions: Vec<RevisionAnalysis>§paragraphs: Vec<ParagraphAnalysis>§sentences: Vec<SentenceAnalysis>§words: Vec<WordAnalysis>§spam_ids: Vec<i32>

Collection of revision IDs that were detected as spam.

These revisions were not analysed and are not included in the revisions, revisions_by_id and ordered_revisions fields.

§revisions_by_id: HashMap<i32, RevisionPointer>

Map of revision ID to RevisionData.

Does not contain revisions that were detected as spam.

§ordered_revisions: Vec<RevisionPointer>

List of revisions in order from oldest to newest.

Does not contain revisions that were detected as spam.

§current_revision: RevisionPointer

The current revision being analysed.

After analysis finished this will be the latest revision that was not marked as spam.

Implementations§

Source§

impl Analysis

Source

pub fn analyse_page(xml_revisions: &[Revision]) -> Result<Self, AnalysisError>

Trait Implementations§

Source§

impl<P: Pointer> Index<&P> for Analysis

Source§

type Output = <P as Pointer>::Data

The returned type after indexing.
Source§

fn index(&self, index: &P) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<P: Pointer> IndexMut<&P> for Analysis

Source§

fn index_mut(&mut self, index: &P) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more