pub struct Roster {
workspace: Arc<Workspace>,
pub projects: Vec<ProjectView>,
}Expand description
The projects and the per-project lists a view draws them from.
Fields§
§workspace: Arc<Workspace>§projects: Vec<ProjectView>Every project in forge.toml, each carrying its catalog
sessions; the same list Workspace::list_projects returns.
Implementations§
Source§impl Roster
impl Roster
pub(super) fn collect(workspace: Arc<Workspace>) -> Self
Sourcepub fn project_named(&self, name: &str) -> Option<&ProjectView>
pub fn project_named(&self, name: &str) -> Option<&ProjectView>
The project name declares, or None for a name no project
declares.
Sourcepub fn project_name_for_path(&self, cwd: &str) -> Option<String>
pub fn project_name_for_path(&self, cwd: &str) -> Option<String>
The declared project NAME that owns cwd, matched by the
longest configured ancestor path.
Sourcepub fn chip_for(&self, project: &ProjectKey) -> Option<SessionChipInfo>
pub fn chip_for(&self, project: &ProjectKey) -> Option<SessionChipInfo>
The account chip project renders beside its row, or None
when no account would serve it.
Sourcepub fn would_bind(&self, project: &ProjectKey) -> bool
pub fn would_bind(&self, project: &ProjectKey) -> bool
Whether a spawn in project would find an account.
Sourcepub fn has_domain(&self, slot: &SessionSlot) -> bool
pub fn has_domain(&self, slot: &SessionSlot) -> bool
Whether slot has a workspace-side domain registered.
Sourcepub fn has_agent(&self, slot: &SessionSlot) -> bool
pub fn has_agent(&self, slot: &SessionSlot) -> bool
Whether slot has a live agent handle.
Sourcepub fn claude_pid(&self, slot: &SessionSlot) -> Option<u32>
pub fn claude_pid(&self, slot: &SessionSlot) -> Option<u32>
OS pid of slot’s claude subprocess, or None when the
session has no live client.
Sourcepub fn config_dir(&self, slot: &SessionSlot) -> Option<PathBuf>
pub fn config_dir(&self, slot: &SessionSlot) -> Option<PathBuf>
The config dir slot’s agent reads, or None when no agent is
registered for it.
Sourcepub fn cwd_for(&self, slot: &SessionSlot) -> Option<PathBuf>
pub fn cwd_for(&self, slot: &SessionSlot) -> Option<PathBuf>
The directory slot’s agent works in: its project’s root, or the
worktree a git worker was forked into.
A session that has not started still resolves. A lead’s directory
comes from the project’s own declaration, so a declared-but-unstarted
project answers its root; None is a slot naming no loaded project at
all, which for a worker means no registry row either.
Sourcepub fn document_roots_for(&self, slot: &SessionSlot) -> Vec<PathBuf>
pub fn document_roots_for(&self, slot: &SessionSlot) -> Vec<PathBuf>
The extra document roots slot’s project declares in
forge.toml; empty when it declares none.
Sourcepub fn tasks_for_project(&self, project: &str) -> Vec<Task>
pub fn tasks_for_project(&self, project: &str) -> Vec<Task>
The task rows declared under the project named project.
Sourcepub fn crons_for_project(&self, project: &str) -> Vec<CronEntry>
pub fn crons_for_project(&self, project: &str) -> Vec<CronEntry>
The durable cron rows declared under the project named
project.
Auto Trait Implementations§
impl !RefUnwindSafe for Roster
impl !UnwindSafe for Roster
impl Freeze for Roster
impl Send for Roster
impl Sync for Roster
impl Unpin for Roster
impl UnsafeUnpin for Roster
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more