pub struct AgentTarget {
org: String,
project: String,
label: String,
}Expand description
A seat named the way forge names one: the (org, project, label)
slot, with lead reserved for a project’s own agent.
Only AgentTarget::parse builds one, so a target that reaches a
tool always names a project configured under the org it claims.
Fields§
§org: String§project: String§label: StringImplementations§
Source§impl AgentTarget
impl AgentTarget
Sourcepub fn parse(
known: &[PeerStatus],
org: &str,
project: &str,
label: Option<&str>,
) -> Result<Self, TargetError>
pub fn parse( known: &[PeerStatus], org: &str, project: &str, label: Option<&str>, ) -> Result<Self, TargetError>
Resolve a caller-supplied target against the projects forge is
configured with. known is the same snapshot list returns, so
anything that resolves here is also something the caller can see.
Components are matched verbatim, never trimmed: a target that nearly names a seat has to refuse, since resolving it would send the message somewhere the caller did not ask for.
Trait Implementations§
Source§impl Clone for AgentTarget
impl Clone for AgentTarget
Source§impl Debug for AgentTarget
impl Debug for AgentTarget
impl Eq for AgentTarget
Source§impl PartialEq for AgentTarget
impl PartialEq for AgentTarget
impl StructuralPartialEq for AgentTarget
Auto Trait Implementations§
impl Freeze for AgentTarget
impl RefUnwindSafe for AgentTarget
impl Send for AgentTarget
impl Sync for AgentTarget
impl Unpin for AgentTarget
impl UnsafeUnpin for AgentTarget
impl UnwindSafe for AgentTarget
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
Mutably borrows from an owned value. Read more
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<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§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> ⓘ
Converts
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> ⓘ
Converts
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