Skip to main content

Row

Struct Row 

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

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§id: String

What the account’s readings and budget are filed under. Empty where Row::account_uuid is.

§account_uuid: String§organization_uuid: Option<String>

The Claude organisation the login is for. None for another tool’s account.

§signed_in: bool§parked: Option<Park>§usage: Option<Snapshot>§stale: Option<Stale>

Implementations§

Source§

impl Row

Source

pub fn lasts(&self, now: i64) -> Option<Lasts<'_>>

How long this account lasts as of now, from its limits’ paces: the question this whole tool exists to answer is which account to use next, and a share alone does not answer it. 73% of a weekly limit is plenty on Saturday and a warning on Monday. An account not in use is not being used, so it lasts until its first reset.

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.