pub struct TransactionStream { /* private fields */ }Implementations§
Source§impl TransactionStream
impl TransactionStream
pub const fn is_finished(&self) -> bool
pub fn next( &mut self, ) -> Result<Option<VerificationResult<Transaction>>, StoreKitError>
Sourcepub fn next_timeout(
&mut self,
timeout: Duration,
) -> Result<Option<VerificationResult<Transaction>>, StoreKitError>
pub fn next_timeout( &mut self, timeout: Duration, ) -> Result<Option<VerificationResult<Transaction>>, StoreKitError>
Examples found in repository?
examples/02_transaction_stream.rs (line 7)
5fn main() -> Result<(), Box<dyn std::error::Error>> {
6 match Transaction::current_entitlements() {
7 Ok(mut stream) => match stream.next_timeout(Duration::from_millis(250))? {
8 Some(result) => println!(
9 "current entitlement: {}",
10 result.payload().data().product_id
11 ),
12 None => println!("no entitlement available within timeout"),
13 },
14 Err(error) => println!("transaction stream unavailable: {error}"),
15 }
16 Ok(())
17}Trait Implementations§
Source§impl Debug for TransactionStream
impl Debug for TransactionStream
Source§impl Drop for TransactionStream
impl Drop for TransactionStream
Auto Trait Implementations§
impl Freeze for TransactionStream
impl RefUnwindSafe for TransactionStream
impl !Send for TransactionStream
impl !Sync for TransactionStream
impl Unpin for TransactionStream
impl UnsafeUnpin for TransactionStream
impl UnwindSafe for TransactionStream
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