pub struct SessionOffer {
pub editions: Vec<String>,
pub preferred: Option<String>,
}Expand description
One participant’s bind-time offer: the two sets it brings to negotiation.
Built for the env, the model, AND this runtime; negotiate_session_floor
reconciles all three (the runtime is a participant because it re-frames
env<->model traffic, so the session runs at an edition all three speak). When
the model and runtime are the same build (in-process / run_local), the floor
degenerates to env ∩ self. Protocol generation is NOT part of the offer — it
is gated by plain equality at each pairwise handshake, so a session that reaches
edition negotiation already shares one generation. Capabilities are advisory and
pairwise (each peer reads the other’s advertised map directly), not negotiated here.
Fields§
§editions: Vec<String>CAN: every workflow edition this participant can operate under — its
retained sealed list, carried on supported_workflow_editions.
preferred: Option<String>WANT: the one edition this participant declares, carried on
preferred_workflow_edition. None (an empty wire value) means
undeclared, and negotiation then reads it as max(editions) — which is
what every peer built before the field existed means.
Implementations§
Source§impl SessionOffer
impl SessionOffer
Sourcepub fn new(editions: &[&str]) -> Self
pub fn new(editions: &[&str]) -> Self
Build an undeclared offer (no WANT) from edition string slices. Whitespace is trimmed.
Sourcepub fn this_build(declared: Option<&str>) -> Self
pub fn this_build(declared: Option<&str>) -> Self
This build’s own offer: the retained list it CAN drive, plus the edition
it declares — declared, or CURRENT_WORKFLOW_EDITION when the
participant pins nothing.
Trait Implementations§
Source§impl Clone for SessionOffer
impl Clone for SessionOffer
Source§impl Debug for SessionOffer
impl Debug for SessionOffer
impl Eq for SessionOffer
Source§impl PartialEq for SessionOffer
impl PartialEq for SessionOffer
impl StructuralPartialEq for SessionOffer
Auto Trait Implementations§
impl Freeze for SessionOffer
impl RefUnwindSafe for SessionOffer
impl Send for SessionOffer
impl Sync for SessionOffer
impl Unpin for SessionOffer
impl UnsafeUnpin for SessionOffer
impl UnwindSafe for SessionOffer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request