pub struct SessionRequest {
pub repo: String,
pub branch: Option<String>,
pub branch_name: Option<String>,
pub branch_prefix: Option<String>,
pub base: Option<String>,
pub execution_checkout: Option<String>,
pub pool: Option<u32>,
pub overflow: Option<Bound>,
pub labels: BTreeMap<String, String>,
}Expand description
What to open a session over.
Fields§
§repo: StringThe repository: an identity key, a registered alias, or a path.
branch: Option<String>The branch to work on.
A name that already exists — in a checkout of this identity, or on origin —
is continued: the session’s worktree is opened at that branch’s tip and
carries the work already on it. A name nothing carries yet is cut fresh from
base. Absent means one is derived, which is always a fresh
cut.
branch_name: Option<String>A name the caller wants a branch cut at, which is a different question
from branch.
branch names a branch to continue — anything already carrying that name
is opened at its tip — so a rendered name cannot arrive there: a collision
would silently continue somebody else’s branch. This one is a proposal, and
this crate does all of the work of turning it into a branch: it is sanitized
into a name git accepts, the host’s branch prefix is put
in front of it, and the first free of <name>, <name>-2, <name>-3, … is
taken — searched against this identity’s local branches and its origin’s. A
proposal nothing usable is left of, and one no suffix can make free, are
refused naming the proposal rather than silently replaced by a derived name.
Absent means a name is derived from the session’s own token, exactly as
before. Naming this and branch is refused: they are two answers to one
question.
branch_prefix: Option<String>The branch prefix this one open cuts against, over everything the host
configures — the highest of the three layers branches
resolves. Absent means the host’s resolution; Some("") is this open saying
it wants none.
It reaches only branches this open cuts: a branch named by
branch is continued or cut at exactly that name, prefixed
by nothing.
base: Option<String>The branch this session’s work is merged with and published into.
For a branch cut fresh it is also the point the branch starts from. For a branch that already exists it is the integration target and nothing else: what is merged in when it has moved on, and what the publication is compared against. Absent means the identity’s registered base. Naming the session’s own branch here is refused — it would publish the branch into itself.
execution_checkout: Option<String>Which registered checkout to clone from. Absent means the identity’s default execution checkout.
pool: Option<u32>The pool size this one open places against, over everything the host
configures: 0 places this session fresh under runs/ — and still spends the
overflow, because the cap is about disk — and N may cut a slot while fewer
than N exist. It removes no slot. Absent means the host’s resolution.
overflow: Option<Bound>The overflow bound this one open is admitted against, over everything the
host configures; Bound::Unlimited is how one open opts out of the cap.
Absent means the host’s resolution.
labels: BTreeMap<String, String>What the caller wants the session record to say about who opened it: the
run, the node, the launching process — whatever it takes to find this
session again without joining anything else. A key is [A-Za-z0-9_-]+ and a
value is one line; what a key means is the caller’s to declare. Stored on
the record, reported by session holders and on every recoverable row,
and what --label filters both by. A resumed session takes each key the
request names over the one it had and keeps the rest.
Trait Implementations§
Source§impl Clone for SessionRequest
impl Clone for SessionRequest
Source§impl Debug for SessionRequest
impl Debug for SessionRequest
Source§impl<'de> Deserialize<'de> for SessionRequest
impl<'de> Deserialize<'de> for SessionRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SessionRequest
Source§impl PartialEq for SessionRequest
impl PartialEq for SessionRequest
Source§impl Serialize for SessionRequest
impl Serialize for SessionRequest
impl StructuralPartialEq for SessionRequest
Auto Trait Implementations§
impl Freeze for SessionRequest
impl RefUnwindSafe for SessionRequest
impl Send for SessionRequest
impl Sync for SessionRequest
impl Unpin for SessionRequest
impl UnsafeUnpin for SessionRequest
impl UnwindSafe for SessionRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.