pub unsafe fn spawn<'a, T: 'a>(self, future: impl Future<Output = T> + Send + 'a) {
        let future: Pin<Box<dyn Future<Output = ()> + Send + 'a>> =
            Box::pin(self.bind_future(future));
        // Safe: We lifted the lifetime checks into the unsafe contract and from there into dart,
        //       they are lifetimes handled by dart anyway, so rusts borrow-checker can
        //       not help us there.
        let future: Pin<Box<dyn Future<Output = ()> + Send + 'static>> =
            unsafe { transmute(future) };
        spawn(future);
    }
/// Spawns the given async-fn's future.
///
/// Once it completes dart is notified about the result.
///
/// If it gets canceled (dropped without completion) the future corresponding
/// to it in dart is completed with an error.
///
/// # Safety
///
/// - The caller must make sure that all lifetimes in the passed in future
///   *always* life until the future is completed or dropped.
///     - This opts out of lifetime checks.
///     - This is done as rust can't check lifetimes coming from dart.
/// - The std impl of `Box<dyn Future<Output=()> + Send + 'a>` must not be specialized
///   on `'a == 'static`.
Spawns the given async-fn's future.
Once it completes dart is notified about the result.

If it gets canceled (dropped without completion) the future corresponding
to it in dart is completed with an error.
Spawns the given async - fn ' s future . Once it completes dart is notified about the result . If it gets canceled ( dropped without completion ) the future corresponding to it in dart is completed with an error .
pub unsafe fn spawn<'a, T: 'a>(self, future: impl Future<Output = T> + Send + 'a) {
        let future: Pin<Box<dyn Future<Output = ()> + Send + 'a>> =
            Box::pin(self.bind_future(future));
        // Safe: We lifted the lifetime checks into the unsafe contract and from there into dart,
        //       they are lifetimes handled by dart anyway, so rusts borrow-checker can
        //       not help us there.
        let future: Pin<Box<dyn Future<Output = ()> + Send + 'static>> =
            unsafe { transmute(future) };
        spawn(future);
    }
pub unsafe fn spawn < ' a , T : ' a > ( self , future : impl Future < Output = T > + Send + ' a ) { let future : Pin < Box < dyn Future < Output = ( ) > + Send + ' a > > = Box :: pin ( self . bind_future ( future ) ) ; // Safe: We lifted the lifetime checks into the unsafe contract and from there into dart, //       they are lifetimes handled by dart anyway, so rusts borrow-checker can //       not help us there. let future : Pin < Box < dyn Future < Output = ( ) > + Send + ' static > > = unsafe { transmute ( future ) } ; spawn ( future ) ; }
Spawns the given async-fn's future.
Spawns the given async - fn ' s future .
self
future
impl Future<Output = T> + Send + 'a
safety
The caller must make sure that all lifetimes in the passed in future
always* life until the future is completed or dropped.
This opts out of lifetime checks.
This is done as rust can't check lifetimes coming from dart.
The std impl of `Box + Send + 'a>` must not be specialized
on `'a == 'static`.
The caller must make sure that all lifetimes in the passed in future always * life until the future is completed or dropped . This opts out of lifetime checks . This is done as rust can ' t check lifetimes coming from dart . The std impl of ` Box + Send + ' a > ` must not be specialized on ` ' a == ' static ` .