pub struct Hello {
pub kind: String,
pub protocol: String,
pub token: String,
pub adapter: AdapterInfo,
pub capabilities: Vec<Capability>,
pub probe: Option<ProbeInfo>,
pub providers: Vec<EvidenceProviderRegistration>,
}Expand description
The adapter’s handshake: sent exactly once, before anything else.
Fields§
§kind: StringWire discriminator (type on the wire).
protocol: StringProtocol identifier; must be termwright/3.
token: StringPer-launch session token from the environment.
adapter: AdapterInfoAdapter name and version.
capabilities: Vec<Capability>What this adapter can provide.
probe: Option<ProbeInfo>Present when the sender is a probe rather than a hand-written adapter.
Carries what the probe can actually observe — framework and versions, the best identity it can produce, and its optional abilities — so the driver negotiates against measured capability rather than a floor.
providers: Vec<EvidenceProviderRegistration>Application providers frozen before this handshake.
Implementations§
Source§impl Hello
impl Hello
Sourcepub fn new(
token: &str,
name: &str,
version: &str,
capabilities: Vec<Capability>,
) -> Self
pub fn new( token: &str, name: &str, version: &str, capabilities: Vec<Capability>, ) -> Self
Build a handshake for this adapter.
Sourcepub fn with_probe(self, probe: ProbeInfo) -> Self
pub fn with_probe(self, probe: ProbeInfo) -> Self
Attach a probe’s declaration to this handshake.
Sourcepub fn with_providers(
self,
providers: Vec<EvidenceProviderRegistration>,
) -> Self
pub fn with_providers( self, providers: Vec<EvidenceProviderRegistration>, ) -> Self
Attach application evidence declarations before the hello is sent.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Hello
impl<'de> Deserialize<'de> for Hello
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Hello
impl StructuralPartialEq for Hello
Auto Trait Implementations§
impl Freeze for Hello
impl RefUnwindSafe for Hello
impl Send for Hello
impl Sync for Hello
impl Unpin for Hello
impl UnsafeUnpin for Hello
impl UnwindSafe for Hello
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
Mutably borrows from an owned value. Read more