Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
Future Class Reference
Inheritance diagram for Future:
Collaboration diagram for Future:

Public Member Functions

None __init__ (self, int attempt_number)
 
bool failed (self)
 
"Future" construct (cls, int attempt_number, t.Any value, bool has_exception)
 

Data Fields

 attempt_number
 

Detailed Description

Encapsulates a (future or past) attempted call to a target function.

Definition at line 402 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

None __init__ (   self,
int  attempt_number 
)

Definition at line 405 of file __init__.py.

405 def __init__(self, attempt_number: int) -> None:
406 super().__init__()
407 self.attempt_number = attempt_number
408
for i

References Future.__init__(), and i.

Referenced by Future.__init__(), and Protocol.__init_subclass__().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ construct()

"Future" construct (   cls,
int  attempt_number,
t.Any  value,
bool  has_exception 
)
Construct a new Future object.

Definition at line 415 of file __init__.py.

415 def construct(cls, attempt_number: int, value: t.Any, has_exception: bool) -> "Future":
416 """Construct a new Future object."""
417 fut = cls(attempt_number)
418 if has_exception:
419 fut.set_exception(value)
420 else:
421 fut.set_result(value)
422 return fut
423
424

References i.

◆ failed()

bool failed (   self)
Return whether a exception is being held in this future.

Definition at line 410 of file __init__.py.

410 def failed(self) -> bool:
411 """Return whether a exception is being held in this future."""
412 return self.exception() is not None
413

References RaiseOnErrorTokenFilter.exception.

Field Documentation

◆ attempt_number

attempt_number

Definition at line 407 of file __init__.py.

Referenced by RetryCallState.set_exception(), and RetryCallState.set_result().


The documentation for this class was generated from the following file: