Skip to main content

Trust

Struct Trust 

Source
pub struct Trust { /* private fields */ }
Expand description

Trust of every (engineer, area) that authored a lesson in one store.

Implementations§

Source§

impl Trust

Source

pub fn compute(lessons: &[Challenge], outcomes: &[Outcome]) -> Trust

From a store’s lessons (latest versions) and its outcomes.

Source

pub fn of(&self, engineer: &str, area_name: &str) -> f64

engineer’s trust in area; neutral when they have no lesson there.

Source

pub fn lesson(&self, c: &Challenge) -> f64

Mean trust of a lesson’s authors in its area; neutral without known authors.

Source

pub fn rows(&self) -> impl Iterator<Item = (&str, &str, Evidence)>

Every (engineer, area) with its evidence, sorted by engineer then area.

Source

pub fn has_evidence(&self) -> bool

Whether any (engineer, area) has evidence beyond the neutral prior.

Trait Implementations§

Source§

impl Debug for Trust

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Trust

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Trust

§

impl RefUnwindSafe for Trust

§

impl Send for Trust

§

impl Sync for Trust

§

impl Unpin for Trust

§

impl UnsafeUnpin for Trust

§

impl UnwindSafe for Trust

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, 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.