pub struct AccountSigner { /* private fields */ }Expand description
An Account locator paired with one actual signer and explicit Auth identity.
The locator is organizational context, never authorization. A direct key
needs no Identity database. Delegated use passes the exact DatabaseKey
identity produced by the Identity API; no referenced Identity or default
signer is implicitly selected. Constructing another handle never rebinds
this one, nor does dropping a bundle invalidate a retained signer handle.
Implementations§
Source§impl AccountSigner
impl AccountSigner
Sourcepub fn new(account_id: ID, key: impl Into<DatabaseKey>) -> Self
pub fn new(account_id: ID, key: impl Into<DatabaseKey>) -> Self
Bind an explicit signer and Account locator. This performs no storage lookup, authorization grant, key import, or daemon login.
pub fn account_id(&self) -> &ID
pub fn key_id(&self) -> PublicKey
pub fn identity(&self) -> &SigKey
Sourcepub fn with_identity(&self, identity: SigKey) -> Self
pub fn with_identity(&self, identity: SigKey) -> Self
Return a newly bound handle using this actual key and an explicit Auth identity. The old handle retains its original identity and signer.
Sourcepub async fn connect(&self, url: impl AsRef<str>) -> Result<Instance>
pub async fn connect(&self, url: impl AsRef<str>) -> Result<Instance>
Open an already-initialized instance and prove signer possession to a service without fetching or registering a daemon-held login bundle. Embedded connections use the same signer API without a wire handshake. Each call creates its own connection; no existing connection is rebound.
Sourcepub async fn open_account(&self, instance: &Instance) -> Result<Account>
pub async fn open_account(&self, instance: &Instance) -> Result<Account>
Open this locator with this signer under ordinary Account Auth.
Trait Implementations§
Source§impl Clone for AccountSigner
impl Clone for AccountSigner
Source§fn clone(&self) -> AccountSigner
fn clone(&self) -> AccountSigner
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 Freeze for AccountSigner
impl RefUnwindSafe for AccountSigner
impl Send for AccountSigner
impl Sync for AccountSigner
impl Unpin for AccountSigner
impl UnsafeUnpin for AccountSigner
impl UnwindSafe for AccountSigner
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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>
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