parameters: (self)
return_statement: return pn_link_drained(self._impl)
docstring: Drain excess credit for this link.
  
          When a link is in drain mode (see :attr:`drain_mode`), the
          sender must use all excess credit immediately, and release
          any excess credit back to the receiver if there are no
          deliveries available to send.
  
          When invoked on a sending link that is in drain mode, this
          operation will release all excess credit back to the receiver
          and return the number of credits released back to the sender.
          If the link is not in drain mode, this operation is a noop.
  
          When invoked on a receiving link, this operation will return
          and reset the number of credits the sender has released back
          to the receiver.
  
          :return: The number of credits drained.
docstring_summary: Drain excess credit for this link.
docstring_tokens: Drain excess credit for this link .
function: def drained(self) -> int:
          """
          Drain excess credit for this link.
  
          When a link is in drain mode (see :attr:`drain_mode`), the
          sender must use all excess credit immediately, and release
          any excess credit back to the receiver if there are no
          deliveries available to send.
  
          When invoked on a sending link that is in drain mode, this
          operation will release all excess credit back to the receiver
          and return the number of credits released back to the sender.
          If the link is not in drain mode, this operation is a noop.
  
          When invoked on a receiving link, this operation will return
          and reset the number of credits the sender has released back
          to the receiver.
  
          :return: The number of credits drained.
          """
          return pn_link_drained(self._impl)
function_tokens: def drained ( self ) -> int : return pn_link_drained ( self . _impl )