pub enum AntFormat {
X(XFormat),
LinkedIn(LinkedInFormat),
}Expand description
A feed format: a categorical question over a platform’s actions, each action weighted.
Variants§
X(XFormat)
LinkedIn(LinkedInFormat)
Implementations§
Source§impl AntFormat
impl AntFormat
pub fn weights(&self) -> &'static [(&'static str, f64)]
pub fn max_weight(&self) -> f64
Sourcepub fn score(&self, counts: &HashMap<String, f64>) -> f64
pub fn score(&self, counts: &HashMap<String, f64>) -> f64
Phoenix style: Σ w_a * (count_a / n). Signed. Empty bucket is NaN.
pub fn from_json(json: &Value) -> Result<AntFormatOrFormat>
pub fn for_kind(kind: Stimuli) -> Vec<AntFormat>
Auto Trait Implementations§
impl !RefUnwindSafe for AntFormat
impl !UnwindSafe for AntFormat
impl Forget for AntFormat
impl Freeze for AntFormat
impl Move for AntFormat
impl Send for AntFormat
impl Sync for AntFormat
impl Unpin for AntFormat
impl UnsafeUnpin for AntFormat
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