pub struct PersonaDialer { /* private fields */ }Expand description
Reusable handle for the control plane’s PersonaService.
The verified identity-linking ceremonies. Shares the AgentService
endpoint — all three services are served on one internal Connect port —
so it is built from the same address.
Implementations§
Source§impl PersonaDialer
impl PersonaDialer
Sourcepub fn new(addr: &str) -> Result<Self, DialError>
pub fn new(addr: &str) -> Result<Self, DialError>
Build a dialer pointed at addr (expects http://host:port).
§Errors
Returns DialError::InvalidAddress if addr isn’t a valid URI.
Sourcepub async fn start_link(
&self,
identity: ExternalIdentity,
) -> Result<StartedLink, DialError>
pub async fn start_link( &self, identity: ExternalIdentity, ) -> Result<StartedLink, DialError>
Mint a single-use link-ceremony code bound to identity’s persona
(provisioning one on first contact). The returned StartedLink::code
is a credential the caller must deliver only to a private channel the
user owns.
§Errors
Returns DialError::Connect for any transport/encoding error.
Sourcepub async fn start_deeplink(
&self,
identity: ExternalIdentity,
) -> Result<StartedDeepLink, DialError>
pub async fn start_deeplink( &self, identity: ExternalIdentity, ) -> Result<StartedDeepLink, DialError>
Mint a high-entropy deep-link token bound to identity’s persona, for
a no-typing ceremony (the caller embeds StartedDeepLink::token in a
platform URL like https://t.me/<bot>?start=<token>). The token is a
credential — deliver the URL only to a private channel the user owns.
Completed via Self::complete_link from the target platform.
§Errors
Returns DialError::Connect for any transport/encoding error.
Sourcepub async fn complete_link(
&self,
code: &str,
identity: ExternalIdentity,
) -> Result<LinkCeremony, DialError>
pub async fn complete_link( &self, code: &str, identity: ExternalIdentity, ) -> Result<LinkCeremony, DialError>
Consume code from the channel being claimed, binding identity to
the minting persona (merging identity’s prior persona if it had one).
§Errors
Returns DialError::Connect for any transport/encoding error.
Sourcepub async fn describe(
&self,
identity: ExternalIdentity,
) -> Result<PersonaView, DialError>
pub async fn describe( &self, identity: ExternalIdentity, ) -> Result<PersonaView, DialError>
Read-only: the profile the identity resolves to, as an edge-friendly
PersonaView. Returns an all-empty view for an identity not yet in
the directory; never provisions a persona.
§Errors
Returns DialError::Connect for any transport/encoding error.
Trait Implementations§
Source§impl Clone for PersonaDialer
impl Clone for PersonaDialer
Source§fn clone(&self) -> PersonaDialer
fn clone(&self) -> PersonaDialer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for PersonaDialer
impl !UnwindSafe for PersonaDialer
impl Freeze for PersonaDialer
impl Send for PersonaDialer
impl Sync for PersonaDialer
impl Unpin for PersonaDialer
impl UnsafeUnpin for PersonaDialer
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,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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