U
    "FZh:	  ã                   @   sz   d Z ddlZddlmZ G dd„ deje dd¡ƒZG dd„ deje dd	¡ƒZeejj	j
ddddƒZd
d„ Zdd„ ZdS )z;Utilities for use with the base interface of RPC Framework.é    N)Úbasec                   @   s   e Zd ZdZdS )Ú_Completionz,A trivial implementation of base.Completion.N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r	   r	   úo/home/aprabhat/apps/x.techxrdev.in/venv/lib/python3.8/site-packages/grpc/framework/interfaces/base/utilities.pyr      s   r   ©Zterminal_metadataÚcodeÚmessagec                   @   s   e Zd ZdZdS )Ú_Subscriptionz.A trivial implementation of base.Subscription.Nr   r	   r	   r	   r
   r   #   s   r   )ÚkindZtermination_callbackZ	allowanceÚoperatorÚprotocol_receiverc                 C   s   t | ||ƒS )a@  Creates a base.Completion aggregating the given operation values.

    Args:
      terminal_metadata: A terminal metadata value for an operation.
      code: A code value for an operation.
      message: A message value for an operation.

    Returns:
      A base.Completion aggregating the given operation values.
    )r   r   r	   r	   r
   Ú
completion8   s    r   c                 C   s   t tjjjdd| |ƒS )ah  Creates a "full" base.Subscription for the given base.Operator.

    Args:
      operator: A base.Operator to be used in an operation.
      protocol_receiver: A base.ProtocolReceiver to be used in an operation.

    Returns:
      A base.Subscription of kind base.Subscription.Kind.FULL wrapping the given
        base.Operator and base.ProtocolReceiver.
    N)r   r   ÚSubscriptionÚKindZFULL)r   r   r	   r	   r
   Úfull_subscriptionF   s        ÿr   )r   ÚcollectionsZgrpc.framework.interfaces.baser   Z
CompletionÚ
namedtupler   r   r   r   ÚNONEZ_NONE_SUBSCRIPTIONr   r   r	   r	   r	   r
   Ú<module>   s2   
þþ
þþ    ÿ