Module spin_sdk.wit.types

Expand source code
from typing import TypeVar, Generic, Union, Optional, Union, Protocol, Tuple, List, Any, Self
from enum import Flag, Enum, auto
from dataclasses import dataclass
from abc import abstractmethod
import weakref


S = TypeVar('S')
@dataclass
class Some(Generic[S]):
    value: S

T = TypeVar('T')
@dataclass
class Ok(Generic[T]):
    value: T

E = TypeVar('E')
@dataclass(frozen=True)
class Err(Generic[E], Exception):
    value: E

Result = Union[Ok[T], Err[E]]
            

Classes

class Err (value: ~E)

Err(value: ~E)

Expand source code
@dataclass(frozen=True)
class Err(Generic[E], Exception):
    value: E

Ancestors

  • typing.Generic
  • builtins.Exception
  • builtins.BaseException

Class variables

var value : ~E
class Ok (value: ~T)

Ok(value: ~T)

Expand source code
@dataclass
class Ok(Generic[T]):
    value: T

Ancestors

  • typing.Generic

Class variables

var value : ~T
class Some (value: ~S)

Some(value: ~S)

Expand source code
@dataclass
class Some(Generic[S]):
    value: S

Ancestors

  • typing.Generic

Class variables

var value : ~S