using System;
using System.Threading.Tasks;
namespace Capnp.Rpc
{
///
/// A promised answer due to RPC.
///
///
/// Disposing the instance before the answer is available results in a best effort attempt to cancel
/// the ongoing call.
///
public interface IPromisedAnswer: IDisposable
{
///
/// Task which will complete when the RPC returns, delivering its result struct.
///
Task WhenReturned { get; }
///
/// Creates a low-level capability for promise pipelining.
///
/// Path to the desired capability inside the result struct.
/// Pipelined low-level capability
ConsumedCapability Access(MemberAccessPath access);
}
}