pub struct Broadcasts { /* private fields */ }Expand description
Cloneable factory attached to every crate::Client. It is target-neutral
and opens no peer connection, signaling avenue, or Iroh packet carrier.
Implementations§
Source§impl Broadcasts
impl Broadcasts
Sourcepub fn prepare_grant_verification(
&self,
token: &str,
issuer: &VerifyingKey,
now_ms: u64,
) -> Result<BroadcastBindingChallenge, BroadcastError>
pub fn prepare_grant_verification( &self, token: &str, issuer: &VerifyingKey, now_ms: u64, ) -> Result<BroadcastBindingChallenge, BroadcastError>
Verify the issuer grant and create a bounded, one-shot device-binding
challenge. No authorization is installed until
Self::complete_grant_verification consumes a valid response.
Sourcepub fn complete_grant_verification(
&self,
token: &str,
issuer: &VerifyingKey,
challenge_handle: &str,
binding_signature: &[u8],
now_ms: u64,
) -> Result<VerifiedBroadcastGrant, BroadcastError>
pub fn complete_grant_verification( &self, token: &str, issuer: &VerifyingKey, challenge_handle: &str, binding_signature: &[u8], now_ms: u64, ) -> Result<VerifiedBroadcastGrant, BroadcastError>
Consume a one-shot binding challenge and return the only grant type accepted by the open methods. Failed signatures are consumed too, so a copied or replayed response cannot be retried against the same request.
pub fn open( &self, grant: VerifiedBroadcastGrant, now_ms: u64, ) -> Result<BroadcastSession, BroadcastError>
pub fn open_with_signer( &self, grant: VerifiedBroadcastGrant, signer: Arc<dyn BroadcastSigner>, now_ms: u64, ) -> Result<BroadcastSession, BroadcastError>
pub fn open_publisher( &self, grant: VerifiedBroadcastGrant, signer: &BroadcastPublisherSigner, now_ms: u64, ) -> Result<BroadcastSession, BroadcastError>
Trait Implementations§
Source§impl Clone for Broadcasts
impl Clone for Broadcasts
Auto Trait Implementations§
impl Freeze for Broadcasts
impl RefUnwindSafe for Broadcasts
impl Send for Broadcasts
impl Sync for Broadcasts
impl Unpin for Broadcasts
impl UnsafeUnpin for Broadcasts
impl UnwindSafe for Broadcasts
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