Skip to main content

Row

Struct Row 

Source
pub struct Row {
    pub provider: ProviderId,
    pub label: Option<String>,
    pub email: String,
    pub account_uuid: String,
    pub signed_in: bool,
    pub parked: Option<Park>,
    pub usage: Option<Snapshot>,
    pub stale: Option<Stale>,
    pub runway: Runway,
}

Fields§

§provider: ProviderId

Which tool this account belongs to, or whose live login this row is.

Every row has one, including a login nobody has enrolled and a login that could not be read, so a front end can always say which tool a row is about and what to type to act on it. A hint that said pitboard enroll work --sign-in about a Codex account would have enrolled a Claude Code one.

§label: Option<String>

None for a login nothing has enrolled: one that is signed in, or one pitboard could not pin on any account (see Row::unplaced).

§email: String§account_uuid: String§signed_in: bool§parked: Option<Park>§usage: Option<Snapshot>§stale: Option<Stale>§runway: Runway

How long this account lasts, from what its limits have been doing.

The question this whole tool exists to answer is which account to use next, and two instantaneous percentages do not answer it: 73% of a weekly limit means nothing without knowing whether it was 40% this morning.

Implementations§

Source§

impl Row

Source

pub fn switchable(&self, now: i64) -> bool

Whether pitboard use would switch to it now.

Source

pub fn key(&self) -> Option<Key>

The account, the way pitboard tells accounts apart. None for a row nothing has enrolled.

Source

pub fn explanation(&self) -> Option<&'static str>

What to tell a person about Row::stale, in the words of this row’s own tool.

Source

pub fn unplaced(&self) -> bool

A tool’s live login that pitboard could not pin on any account: one it could not read, or read and could not use. It has no email and no account id, and nothing to type about it but pitboard doctor, so a front end says what it is rather than showing it as an account nobody has enrolled.

Auto Trait Implementations§

§

impl Freeze for Row

§

impl RefUnwindSafe for Row

§

impl Send for Row

§

impl Sync for Row

§

impl Unpin for Row

§

impl UnsafeUnpin for Row

§

impl UnwindSafe for Row

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> Same for T

Source§

type Output = T

Should always be Self
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.