efetch
Types
pub type ConnectError {
EACCES
EPERM
EADDRINUSE
EADDRNOTAVAIL
EAFNOSUPPORT
EAGAIN
EALREADY
EBADF
ECONNREFUSED
EFAULT
EINPROGRESS
EINTR
EISCONN
ENETUNREACH
ENOTSOCK
EPROTOTYPE
ETIMEDOUT
UnknownConnectError(String)
}
Constructors
-
EACCES -
EPERM -
EADDRINUSE -
EADDRNOTAVAIL -
EAFNOSUPPORT -
EAGAIN -
EALREADY -
EBADF -
ECONNREFUSED -
EFAULT -
EINPROGRESS -
EINTR -
EISCONN -
ENETUNREACH -
ENOTSOCK -
EPROTOTYPE -
ETIMEDOUT -
UnknownConnectError(String)
pub type DNSError {
NoData
Formerr
ServerFail
NotFound
NotImplemented
Refused
BadQuery
BadName
BadFamily
BadResponse
ConnectionRefused
Timeout
EOF
File
NoMem
Destruction
BadString
BadFlags
NoName
BadHints
NotInitialized
LoadIPHLPAPI
AddrGetNetworkParams
Cancelled
TryAgainLater
UnknownDNSError(String)
}
Constructors
-
NoDatadns.NODATA: DNS server returned an answer with no data. -
Formerrdns.FORMERR: DNS server claims query was misformatted. -
ServerFaildns.SERVFAIL: DNS server returned general failure. -
NotFounddns.NOTFOUND: Domain name not found. -
NotImplementeddns.NOTIMP: DNS server does not implement the requested operation. -
Refuseddns.REFUSED: DNS server refused query. -
BadQuerydns.BADQUERY: Misformatted DNS query. -
BadNamedns.BADNAME: Misformatted host name. -
BadFamilydns.BADFAMILY: Unsupported address family. -
BadResponsedns.BADRESP: Misformatted DNS reply. -
ConnectionRefuseddns.CONNREFUSED: Could not contact DNS servers. -
Timeoutdns.TIMEOUT: Timeout while contacting DNS servers. -
EOFdns.EOF: End of file. -
Filedns.FILE: Error reading file. -
NoMemdns.NOMEM: Out of memory. -
Destructiondns.DESTRUCTION: Channel is being destroyed. -
BadStringdns.BADSTR: Misformatted string. -
BadFlagsdns.BADFLAGS: Illegal flags specified. -
NoNamedns.NONAME: Given host name is not numeric. -
BadHintsdns.BADHINTS: Illegal hints flags specified. -
NotInitializeddns.NOTINITIALIZED: c-ares library initialization not yet performed. -
LoadIPHLPAPIdns.LOADIPHLPAPI: Error loading iphlpapi.dll. -
AddrGetNetworkParamsdns.ADDRGETNETWORKPARAMS: Could not find GetNetworkParams function. -
Cancelleddns.CANCELLED: DNS query cancelled. -
TryAgainLaterEAI_AGAIN: The name server returned a temporary failure indication. Try again later. -
UnknownDNSError(String)
pub type HttpError {
DNSError(DNSError)
ConnectError(ConnectError)
TLSError(TLSError)
UnknownNetworkError(String)
InvalidUtf8Response
UnableToReadBody
InvalidJsonBody
Other(Dynamic)
}
Constructors
-
DNSError(DNSError) -
ConnectError(ConnectError) -
TLSError(TLSError) -
UnknownNetworkError(String) -
InvalidUtf8Response -
UnableToReadBody -
InvalidJsonBody -
Other(Dynamic)
Functions
pub fn send(
req: Request(String),
callback: fn(Result(Response(String), HttpError)) -> a,
) -> Request(String)