Selfie
Loading...
Searching...
No Matches
selfie_lib.SnapshotValue.SnapshotValueBinary Class Reference
Inheritance diagram for selfie_lib.SnapshotValue.SnapshotValueBinary:
selfie_lib.SnapshotValue.SnapshotValue

Public Member Functions

 __init__ (self, bytes value)
 
bytes value_binary (self)
 
str value_string (self)
 
bool __eq__ (self, object other)
 
int __hash__ (self)
 
- Public Member Functions inherited from selfie_lib.SnapshotValue.SnapshotValue
bool is_binary (self)
 

Protected Attributes

 _value
 

Additional Inherited Members

- Static Public Member Functions inherited from selfie_lib.SnapshotValue.SnapshotValue
"SnapshotValue" of (Union[bytes, str, "SnapshotValue"] data)
 

Detailed Description

Definition at line 32 of file SnapshotValue.py.

Constructor & Destructor Documentation

◆ __init__()

selfie_lib.SnapshotValue.SnapshotValueBinary.__init__ (   self,
bytes  value 
)

Definition at line 33 of file SnapshotValue.py.

33 def __init__(self, value: bytes):
34 self._value = value
35

Member Function Documentation

◆ __eq__()

bool selfie_lib.SnapshotValue.SnapshotValueBinary.__eq__ (   self,
object  other 
)

Definition at line 42 of file SnapshotValue.py.

42 def __eq__(self, other: object) -> bool:
43 if isinstance(other, SnapshotValueBinary):
44 return self.value_binary() == other.value_binary()
45 return False
46

◆ __hash__()

int selfie_lib.SnapshotValue.SnapshotValueBinary.__hash__ (   self)

Definition at line 47 of file SnapshotValue.py.

47 def __hash__(self) -> int:
48 return hash(self._value)
49
50

◆ value_binary()

bytes selfie_lib.SnapshotValue.SnapshotValueBinary.value_binary (   self)

Reimplemented from selfie_lib.SnapshotValue.SnapshotValue.

Definition at line 36 of file SnapshotValue.py.

36 def value_binary(self) -> bytes:
37 return self._value
38

◆ value_string()

str selfie_lib.SnapshotValue.SnapshotValueBinary.value_string (   self)

Reimplemented from selfie_lib.SnapshotValue.SnapshotValue.

Definition at line 39 of file SnapshotValue.py.

39 def value_string(self) -> str:
40 raise NotImplementedError("This is a binary value.")
41

Member Data Documentation

◆ _value

selfie_lib.SnapshotValue.SnapshotValueBinary._value
protected

Definition at line 34 of file SnapshotValue.py.


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