mirror of https://github.com/zedeus/nitter
21 lines
380 B
Nim
21 lines
380 B
Nim
from ../../types import Error
|
|
|
|
type
|
|
Url* = object
|
|
url*: string
|
|
expandedUrl*: string
|
|
displayUrl*: string
|
|
indices*: array[2, int]
|
|
|
|
ErrorObj* = object
|
|
code*: Error
|
|
message*: string
|
|
|
|
Errors* = object
|
|
errors*: seq[ErrorObj]
|
|
|
|
proc contains*(codes: set[Error]; errors: Errors): bool =
|
|
for e in errors.errors:
|
|
if e.code in codes:
|
|
return true
|