orottier / webpage-rs Goto Github PK
View Code? Open in Web Editor NEWSmall Rust library to fetch info about a web page: title, description, language, HTTP info, RSS feeds, Opengraph, Schema.org, and more
Home Page: https://docs.rs/webpage
Small Rust library to fetch info about a web page: title, description, language, HTTP info, RSS feeds, Opengraph, Schema.org, and more
Home Page: https://docs.rs/webpage
According to reports from our users, webpage-rs is unable to parse info from https://oko.press/ website.
I was able to reproduce this by putting the site url into from_url test case.
Downstream issue: LemmyNet/lemmy#1796 (the other sites mentioned in the issue work fine in my tests).
For example, an URL like http://äläomista.fi/ is legal and works with a browser.
There is a catch: the web client should translate the dns names with non-ascii (UTF-8) chars properly,
and this example domain would translate into xn--lomista-4wab.fi
More info can be found here:
https://en.wikipedia.org/wiki/Internationalized_domain_name#Example_of_IDNA_encoding
webpage::Webpage being Clone would be extremely useful
Hello, some websites use a slightly different version of schema.org that places all of the objects under a '@graph' tag, preventing the crate from fetching those tags because it expects them to be in the root object.
I can open a PR to fix this, let me know if you have any doubts or concerns!
Example website: https://www.vice.com/en/article/y3p9jx/nyc-bans-students-and-teachers-from-using-chatgpt
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://www.vice.com/en"
},
{
"@type": "ListItem",
"position": 2,
"name": "Tech",
"item": "https://www.vice.com/en/section/tech"
}
]
},
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://www.vice.com/en/article/y3p9jx/nyc-bans-students-and-teachers-from-using-chatgpt"
},
"headline": "NYC Bans Students and Teachers from Using ChatGPT",
"image": [
"https://video-images.vice.com/articles/63b5aa421a9f6b858be7e769/lede/1672850154200-gettyimages-1240129495.jpeg?crop=1xw:0.843xh;0xw,0xh&resize=1200:*"
],
"datePublished": "2023-01-04T16:37:42.109Z",
"dateModified": "2023-01-04T16:37:42.109Z",
"author": {
"@type": "Person",
"name": "Samantha Cole"
},
"publisher": {
"@type": "Organization",
"name": "VICE",
"logo": {
"@type": "ImageObject",
"url": "https://vice-web-statics-cdn.vice.com/images/vice-og.png"
}
}
},
{
"@context": "https://schema.org",
"@type": "ItemList",
"name": "NYC Bans Students and Teachers from Using ChatGPT",
"itemListElement": []
},
[]
]
}
the resulting html object:
HTML {
title: Some(
"NYC Bans Students and Teachers from Using ChatGPT",
),
description: Some(
"The machine learning chatbot is inaccessible on school networks and devices, due to \"concerns about negative impacts on student learning,\" a spokesperson said.",
),
url: Some(
"https://www.vice.com/en/article/y3p9jx/nyc-bans-students-and-teachers-from-using-chatgpt",
),
...
schema_org: [],
}
In this case the schema_org
field is empty, but I'm expecting the schema_org
field to contain the objects under @graph
.
So when we add a new field to e.g. HTML
it won't be a breaking change
When using one of the examples I get an error because apparently the HTML struct is now private. This is no longer possible:
use webpage::HTML;
let html = HTML::from_file("index.html", None);
// or let html = HTML::from_string(input, None);
if i add webpage = { version = "1.4", features = ["serde"] } I got below errors and if I remove them it builds.
Cargo.toml file
`[package]
name = "crypto-rates-wasm"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[dependencies]
wasm-bindgen = "0.2.78"
webpage = { version = "1.4", features = ["serde"] }
`
after hitting wasm-pack build --target web I got list of errors
| 661 | sys::send_to_vectored(self.as_raw(), bufs, addr, flags) | ^^^^^^^^^^^^^^^^ not found in
sys`
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:748:53
|
748 | getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_BROADCAST)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_BROADCAST
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:748:70
|
748 | getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_BROADCAST)
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:761:22
|
761 | sys::SOL_SOCKET,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_BROADCAST
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:762:22
|
762 | sys::SO_BROADCAST,
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:774:64
|
774 | match unsafe { getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_ERROR) } {
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_ERROR
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:774:81
|
774 | match unsafe { getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_ERROR) } {
| ^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:788:52
|
788 | getsockopt::(self.as_raw(), sys::SOL_SOCKET, sys::SO_KEEPALIVE)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_KEEPALIVE
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:788:69
|
788 | getsockopt::(self.as_raw(), sys::SOL_SOCKET, sys::SO_KEEPALIVE)
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:800:22
|
800 | sys::SOL_SOCKET,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_KEEPALIVE
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:801:22
|
801 | sys::SO_KEEPALIVE,
| ^^^^^^^^^^^^ not found in sys
error[E0412]: cannot find type linger
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:814:31
|
814 | getsockopt::sys::linger(self.as_raw(), sys::SOL_SOCKET, sys::SO_LINGER)
| ^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:814:59
|
814 | getsockopt::sys::linger(self.as_raw(), sys::SOL_SOCKET, sys::SO_LINGER)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_LINGER
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:814:76
|
814 | getsockopt::sys::linger(self.as_raw(), sys::SOL_SOCKET, sys::SO_LINGER)
| ^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:835:49
|
835 | unsafe { setsockopt(self.as_raw(), sys::SOL_SOCKET, sys::SO_LINGER, linger) }
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_LINGER
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:835:66
|
835 | unsafe { setsockopt(self.as_raw(), sys::SOL_SOCKET, sys::SO_LINGER, linger) }
| ^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:847:53
|
847 | getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_OOBINLINE)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_OOBINLINE
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:847:70
|
847 | getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_OOBINLINE)
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:864:22
|
864 | sys::SOL_SOCKET,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_OOBINLINE
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:865:22
|
865 | sys::SO_OOBINLINE,
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:878:53
|
878 | getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_RCVBUF)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_RCVBUF
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:878:70
|
878 | getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_RCVBUF)
| ^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:891:22
|
891 | sys::SOL_SOCKET,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_RCVBUF
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:892:22
|
892 | sys::SO_RCVBUF,
| ^^^^^^^^^ not found in sys
error[E0425]: cannot find function timeout_opt
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:903:14
|
903 | sys::timeout_opt(self.as_raw(), sys::SOL_SOCKET, sys::SO_RCVTIMEO)
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:903:46
|
903 | sys::timeout_opt(self.as_raw(), sys::SOL_SOCKET, sys::SO_RCVTIMEO)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_RCVTIMEO
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:903:63
|
903 | sys::timeout_opt(self.as_raw(), sys::SOL_SOCKET, sys::SO_RCVTIMEO)
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find function set_timeout_opt
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:911:14
|
911 | sys::set_timeout_opt(self.as_raw(), sys::SOL_SOCKET, sys::SO_RCVTIMEO, duration)
| ^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:911:50
|
911 | sys::set_timeout_opt(self.as_raw(), sys::SOL_SOCKET, sys::SO_RCVTIMEO, duration)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_RCVTIMEO
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:911:67
|
911 | sys::set_timeout_opt(self.as_raw(), sys::SOL_SOCKET, sys::SO_RCVTIMEO, duration)
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:921:53
|
921 | getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_REUSEADDR)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_REUSEADDR
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:921:70
|
921 | getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_REUSEADDR)
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:935:22
|
935 | sys::SOL_SOCKET,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_REUSEADDR
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:936:22
|
936 | sys::SO_REUSEADDR,
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:949:53
|
949 | getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_SNDBUF)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_SNDBUF
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:949:70
|
949 | getsockopt::<c_int>(self.as_raw(), sys::SOL_SOCKET, sys::SO_SNDBUF)
| ^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:962:22
|
962 | sys::SOL_SOCKET,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_SNDBUF
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:963:22
|
963 | sys::SO_SNDBUF,
| ^^^^^^^^^ not found in sys
error[E0425]: cannot find function timeout_opt
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:974:14
|
974 | sys::timeout_opt(self.as_raw(), sys::SOL_SOCKET, sys::SO_SNDTIMEO)
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:974:46
|
974 | sys::timeout_opt(self.as_raw(), sys::SOL_SOCKET, sys::SO_SNDTIMEO)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_SNDTIMEO
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:974:63
|
974 | sys::timeout_opt(self.as_raw(), sys::SOL_SOCKET, sys::SO_SNDTIMEO)
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find function set_timeout_opt
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:982:14
|
982 | sys::set_timeout_opt(self.as_raw(), sys::SOL_SOCKET, sys::SO_SNDTIMEO, duration)
| ^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOL_SOCKET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:982:50
|
982 | sys::set_timeout_opt(self.as_raw(), sys::SOL_SOCKET, sys::SO_SNDTIMEO, duration)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SO_SNDTIMEO
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:982:67
|
982 | sys::set_timeout_opt(self.as_raw(), sys::SOL_SOCKET, sys::SO_SNDTIMEO, duration)
| ^^^^^^^^^^^ not found in sys
error[E0412]: cannot find type linger
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:986:29
|
986 | fn from_linger(linger: sys::linger) -> Option {
| ^^^^^^ not found in sys
error[E0412]: cannot find type linger
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:994:52
|
994 | fn into_linger(duration: Option) -> sys::linger {
| ^^^^^^ not found in sys
error[E0422]: cannot find struct, variant or union type linger
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:996:32
|
996 | Some(duration) => sys::linger {
| ^^^^^^ not found in sys
error[E0422]: cannot find struct, variant or union type linger
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1000:22
|
1000 | None => sys::linger {
| ^^^^^^ not found in sys
error[E0422]: cannot find struct, variant or union type IpMreq
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1101:25
|
1101 | let mreq = sys::IpMreq {
| ^^^^^^ not found in sys
error[E0425]: cannot find function to_in_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1102:33
|
1102 | imr_multiaddr: sys::to_in_addr(multiaddr),
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find function to_in_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1103:33
|
1103 | imr_interface: sys::to_in_addr(interface),
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1105:49
|
1105 | unsafe { setsockopt(self.as_raw(), sys::IPPROTO_IP, sys::IP_ADD_MEMBERSHIP, mreq) }
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_ADD_MEMBERSHIP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1105:66
|
1105 | unsafe { setsockopt(self.as_raw(), sys::IPPROTO_IP, sys::IP_ADD_MEMBERSHIP, mreq) }
| ^^^^^^^^^^^^^^^^^ not found in sys
error[E0422]: cannot find struct, variant or union type IpMreq
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1114:25
|
1114 | let mreq = sys::IpMreq {
| ^^^^^^ not found in sys
error[E0425]: cannot find function to_in_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1115:33
|
1115 | imr_multiaddr: sys::to_in_addr(multiaddr),
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find function to_in_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1116:33
|
1116 | imr_interface: sys::to_in_addr(interface),
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1121:22
|
1121 | sys::IPPROTO_IP,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_DROP_MEMBERSHIP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1122:22
|
1122 | sys::IP_DROP_MEMBERSHIP,
| ^^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find function to_mreqn
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1147:26
|
1147 | let mreqn = sys::to_mreqn(multiaddr, interface);
| ^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1151:22
|
1151 | sys::IPPROTO_IP,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_ADD_MEMBERSHIP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1152:22
|
1152 | sys::IP_ADD_MEMBERSHIP,
| ^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find function to_mreqn
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1176:26
|
1176 | let mreqn = sys::to_mreqn(multiaddr, interface);
| ^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1180:22
|
1180 | sys::IPPROTO_IP,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_DROP_MEMBERSHIP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1181:22
|
1181 | sys::IP_DROP_MEMBERSHIP,
| ^^^^^^^^^^^^^^^^^^ not found in sys
error[E0422]: cannot find struct, variant or union type IpMreqSource
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1208:26
|
1208 | let mreqs = sys::IpMreqSource {
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find function to_in_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1209:33
|
1209 | imr_multiaddr: sys::to_in_addr(group),
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find function to_in_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1210:33
|
1210 | imr_interface: sys::to_in_addr(interface),
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find function to_in_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1211:34
|
1211 | imr_sourceaddr: sys::to_in_addr(source),
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1216:22
|
1216 | sys::IPPROTO_IP,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_ADD_SOURCE_MEMBERSHIP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1217:22
|
1217 | sys::IP_ADD_SOURCE_MEMBERSHIP,
| ^^^^^^^^^^^^^^^^^^^^^^^^ not found in sys
error[E0422]: cannot find struct, variant or union type IpMreqSource
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1242:26
|
1242 | let mreqs = sys::IpMreqSource {
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find function to_in_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1243:33
|
1243 | imr_multiaddr: sys::to_in_addr(group),
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find function to_in_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1244:33
|
1244 | imr_interface: sys::to_in_addr(interface),
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find function to_in_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1245:34
|
1245 | imr_sourceaddr: sys::to_in_addr(source),
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1250:22
|
1250 | sys::IPPROTO_IP,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_DROP_SOURCE_MEMBERSHIP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1251:22
|
1251 | sys::IP_DROP_SOURCE_MEMBERSHIP,
| ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1264:44
|
1264 | getsockopt(self.as_raw(), sys::IPPROTO_IP, sys::IP_MULTICAST_IF).map(sys::from_in_addr)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_MULTICAST_IF
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1264:61
|
1264 | getsockopt(self.as_raw(), sys::IPPROTO_IP, sys::IP_MULTICAST_IF).map(sys::from_in_addr)
| ^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value from_in_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1264:87
|
1264 | getsockopt(self.as_raw(), sys::IPPROTO_IP, sys::IP_MULTICAST_IF).map(sys::from_in_addr)
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find function to_in_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1272:30
|
1272 | let interface = sys::to_in_addr(interface);
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1276:22
|
1276 | sys::IPPROTO_IP,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_MULTICAST_IF
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1277:22
|
1277 | sys::IP_MULTICAST_IF,
| ^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1290:53
|
1290 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_MULTICAST_LOOP)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_MULTICAST_LOOP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1290:70
|
1290 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_MULTICAST_LOOP)
| ^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1303:22
|
1303 | sys::IPPROTO_IP,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_MULTICAST_LOOP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1304:22
|
1304 | sys::IP_MULTICAST_LOOP,
| ^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1317:53
|
1317 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_MULTICAST_TTL)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_MULTICAST_TTL
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1317:70
|
1317 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_MULTICAST_TTL)
| ^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1333:22
|
1333 | sys::IPPROTO_IP,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_MULTICAST_TTL
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1334:22
|
1334 | sys::IP_MULTICAST_TTL,
| ^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1347:53
|
1347 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_TTL).map(|ttl| ttl as u32)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_TTL
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1347:70
|
1347 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_TTL).map(|ttl| ttl as u32)
| ^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1356:49
|
1356 | unsafe { setsockopt(self.as_raw(), sys::IPPROTO_IP, sys::IP_TTL, ttl as c_int) }
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_TTL
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1356:66
|
1356 | unsafe { setsockopt(self.as_raw(), sys::IPPROTO_IP, sys::IP_TTL, ttl as c_int) }
| ^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1373:49
|
1373 | unsafe { setsockopt(self.as_raw(), sys::IPPROTO_IP, sys::IP_TOS, tos as c_int) }
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_TOS
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1373:66
|
1373 | unsafe { setsockopt(self.as_raw(), sys::IPPROTO_IP, sys::IP_TOS, tos as c_int) }
| ^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1392:53
|
1392 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_TOS).map(|tos| tos as u32)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_TOS
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1392:70
|
1392 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_TOS).map(|tos| tos as u32)
| ^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1417:22
|
1417 | sys::IPPROTO_IP,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_RECVTOS
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1418:22
|
1418 | sys::IP_RECVTOS,
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1441:53
|
1441 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_RECVTOS)
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IP_RECVTOS
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1441:70
|
1441 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IP, sys::IP_RECVTOS)
| ^^^^^^^^^^ not found in sys
error[E0422]: cannot find struct, variant or union type Ipv6Mreq
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1461:25
|
1461 | let mreq = sys::Ipv6Mreq {
| ^^^^^^^^ not found in sys
error[E0425]: cannot find function to_in6_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1462:36
|
1462 | ipv6mr_multiaddr: sys::to_in6_addr(multiaddr),
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1469:22
|
1469 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPV6_ADD_MEMBERSHIP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1470:22
|
1470 | sys::IPV6_ADD_MEMBERSHIP,
| ^^^^^^^^^^^^^^^^^^^ not found in sys
error[E0422]: cannot find struct, variant or union type Ipv6Mreq
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1484:25
|
1484 | let mreq = sys::Ipv6Mreq {
| ^^^^^^^^ not found in sys
error[E0425]: cannot find function to_in6_addr
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1485:36
|
1485 | ipv6mr_multiaddr: sys::to_in6_addr(multiaddr),
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1492:22
|
1492 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPV6_DROP_MEMBERSHIP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1493:22
|
1493 | sys::IPV6_DROP_MEMBERSHIP,
| ^^^^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1506:53
|
1506 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_MULTICAST_HOPS)
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPV6_MULTICAST_HOPS
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1506:72
|
1506 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_MULTICAST_HOPS)
| ^^^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1520:22
|
1520 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPV6_MULTICAST_HOPS
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1521:22
|
1521 | sys::IPV6_MULTICAST_HOPS,
| ^^^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1534:53
|
1534 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_MULTICAST_IF)
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPV6_MULTICAST_IF
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1534:72
|
1534 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_MULTICAST_IF)
| ^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1548:22
|
1548 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPV6_MULTICAST_IF
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1549:22
|
1549 | sys::IPV6_MULTICAST_IF,
| ^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1562:53
|
1562 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_MULTICAST_LOOP)
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPV6_MULTICAST_LOOP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1562:72
|
1562 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_MULTICAST_LOOP)
| ^^^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1575:22
|
1575 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPV6_MULTICAST_LOOP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1576:22
|
1576 | sys::IPV6_MULTICAST_LOOP,
| ^^^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1587:53
|
1587 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_UNICAST_HOPS)
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPV6_UNICAST_HOPS
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1587:72
|
1587 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_UNICAST_HOPS)
| ^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1599:22
|
1599 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPV6_UNICAST_HOPS
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1600:22
|
1600 | sys::IPV6_UNICAST_HOPS,
| ^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1613:53
|
1613 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_V6ONLY)
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPV6_V6ONLY
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1613:72
|
1613 | getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_V6ONLY)
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_IPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1630:22
|
1630 | sys::IPPROTO_IPV6,
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPV6_V6ONLY
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1631:22
|
1631 | sys::IPV6_V6ONLY,
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find function set_tcp_keepalive
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1790:14
|
1790 | sys::set_tcp_keepalive(self.as_raw(), params)
| ^^^^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_TCP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1800:52
|
1800 | getsockopt::(self.as_raw(), sys::IPPROTO_TCP, sys::TCP_NODELAY)
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value TCP_NODELAY
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1800:70
|
1800 | getsockopt::(self.as_raw(), sys::IPPROTO_TCP, sys::TCP_NODELAY)
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_TCP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1816:22
|
1816 | sys::IPPROTO_TCP,
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value TCP_NODELAY
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1817:22
|
1817 | sys::TCP_NODELAY,
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value AF_INET
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:158:42
|
158 | pub const IPV4: Domain = Domain(sys::AF_INET);
| ^^^^^^^ not found in sys
error[E0425]: cannot find value AF_INET6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:161:42
|
161 | pub const IPV6: Domain = Domain(sys::AF_INET6);
| ^^^^^^^^ not found in sys
error[E0425]: cannot find value SOCK_STREAM
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:200:40
|
200 | pub const STREAM: Type = Type(sys::SOCK_STREAM);
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value SOCK_DGRAM
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:205:39
|
205 | pub const DGRAM: Type = Type(sys::SOCK_DGRAM);
| ^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_ICMP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:242:48
|
242 | pub const ICMPV4: Protocol = Protocol(sys::IPPROTO_ICMP);
| ^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_ICMPV6
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:245:48
|
245 | pub const ICMPV6: Protocol = Protocol(sys::IPPROTO_ICMPV6);
| ^^^^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_TCP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:248:45
|
248 | pub const TCP: Protocol = Protocol(sys::IPPROTO_TCP);
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value IPPROTO_UDP
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:251:45
|
251 | pub const UDP: Protocol = Protocol(sys::IPPROTO_UDP);
| ^^^^^^^^^^^ not found in sys
error[E0425]: cannot find value MSG_TRUNC
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:284:23
|
284 | self.0 & sys::MSG_TRUNC != 0
| ^^^^^^^^^ not found in sys
error[E0412]: cannot find type MaybeUninitSlice
in module sys
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:292:38
|
292 | pub struct MaybeUninitSlice<'a>(sys::MaybeUninitSlice<'a>);
| ^^^^^^^^^^^^^^^^ not found in sys
error: failed to run custom build command for libz-sys v1.1.8
Caused by:
process didn't exit successfully: /workspaces/rust-learning/target/release/build/libz-sys-5d870231b03c8667/build-script-build
(exit status: 1)
--- stdout
cargo:rerun-if-env-changed=LIBZ_SYS_STATIC
cargo:rerun-if-changed=build.rs
cargo:rerun-if-env-changed=ZLIB_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_wasm32-unknown-unknown
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_wasm32_unknown_unknown
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_wasm32-unknown-unknown
cargo:rerun-if-env-changed=PKG_CONFIG_wasm32_unknown_unknown
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_wasm32-unknown-unknown
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_wasm32_unknown_unknown
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo-warning=pkg-config has not been configured to support cross-compilation.
Install a sysroot for the target platform and configure it via
PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
cross-compiling wrapper for pkg-config and set it via
PKG_CONFIG environment variable.
TARGET = Some("wasm32-unknown-unknown")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-unknown-linux-gnu")
CC_wasm32-unknown-unknown = None
CC_wasm32_unknown_unknown = None
TARGET_CC = None
CC = None
CFLAGS_wasm32-unknown-unknown = None
CFLAGS_wasm32_unknown_unknown = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "src/zlib" "-fvisibility=hidden" "-DZ_SOLO" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/workspaces/rust-learning/target/wasm32-unknown-unknown/release/build/libz-sys-eb66d0574c370470/out/lib/src/zlib/adler32.o" "-c" "src/zlib/adler32.c"
--- stderr
error occurred: Failed to find tool. Is clang
installed?
warning: build failed, waiting for other jobs to finish...
error[E0061]: this function takes 4 arguments but 3 arguments were supplied
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/sockaddr.rs:179:33
|
179 | Some(SocketAddr::V6(SocketAddrV6::new(
| ____________________^^^^^^^^^^^^^^^^^-
180 | | ip,
181 | | port,
182 | | addr.sin6_flowinfo,
... |
188 | | },
189 | | )))
| |- an argument of type u32
is missing
|
note: associated function defined here
--> /usr/local/rustup/toolchains/1.64.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/net/addr.rs:373:18
|
373 | pub const fn new(ip: Ipv6Addr, port: u16, flowinfo: u32, scope_id: u32) -> SocketAddrV6 {
| ^^^
help: provide the argument
|
179 | Some(SocketAddr::V6(SocketAddrV6::new(ip, port, addr.sin6_flowinfo, /* u32 */)))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error[E0308]: mismatched types
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1898:23
|
1898 | from!(net::TcpStream, Socket);
| ^^^^^^ expected struct Socket
, found ()
|
::: /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:104:16
|
104 | fn from(socket: $from) -> $for {
| ---- implicitly returns ()
as its body has no tail or return
expression
error[E0308]: mismatched types
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1899:25
|
1899 | from!(net::TcpListener, Socket);
| ^^^^^^ expected struct Socket
, found ()
|
::: /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:104:16
|
104 | fn from(socket: $from) -> $for {
| ---- implicitly returns ()
as its body has no tail or return
expression
error[E0308]: mismatched types
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1900:23
|
1900 | from!(net::UdpSocket, Socket);
| ^^^^^^ expected struct Socket
, found ()
|
::: /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:104:16
|
104 | fn from(socket: $from) -> $for {
| ---- implicitly returns ()
as its body has no tail or return
expression
error[E0308]: mismatched types
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1901:15
|
1901 | from!(Socket, net::TcpStream);
| ^^^^^^^^^^^^^^ expected struct TcpStream
, found ()
|
::: /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:104:16
|
104 | fn from(socket: $from) -> $for {
| ---- implicitly returns ()
as its body has no tail or return
expression
error[E0308]: mismatched types
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1902:15
|
1902 | from!(Socket, net::TcpListener);
| ^^^^^^^^^^^^^^^^ expected struct TcpListener
, found ()
|
::: /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:104:16
|
104 | fn from(socket: $from) -> $for {
| ---- implicitly returns ()
as its body has no tail or return
expression
error[E0308]: mismatched types
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/socket.rs:1903:15
|
1903 | from!(Socket, net::UdpSocket);
| ^^^^^^^^^^^^^^ expected struct UdpSocket
, found ()
|
::: /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.7/src/lib.rs:104:16
|
104 | fn from(socket: $from) -> $for {
| ---- implicitly returns ()
as its body has no tail or return
expression
Some errors have detailed explanations: E0061, E0308, E0412, E0422, E0425, E0432, E0433, E0583.
For more information about an error, try rustc --explain E0061
.
error: could not compile socket2
due to 193 previous errors
Error: Compiling your crate to WebAssembly failed
Caused by: failed to execute cargo build
: exited with exit status: 101
full command: "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"`
I wonder if making the main structs (de)serializable using #[derive(Deserializable, Serializable)]
from serde wouldn't be a good addition. I'm new to rust so maybe there is a way to do this easily from outside the crate, so this starts more as a question than a suggestion. I tried to use serde's remote serialization but, besides having to mirror all structs from this library, I bumped into Vec<OpengraphObejct>
and I couldn't find a way easily (in a declarative way) define how to (de)serialize that.
I know adding serde as a dependency might not be desired by all users, but maybe it can be added conditionally through a feature flag?
If you think this is a good idea I might even give it a try as a rust exercise :)
PS: Unrelated quick question: any reason why Webpage
doesn't derive Debug
too? I notice most structs in the library do.
Get rid of the pub use ...
stuff
Just wondering if you've considered keeping a vector of the links found in the HTML. Seems like a pretty straightforward thing to do since you're already parsing the HTML. I'm starting to look at the source code and will see what it might take to add, maybe come up with a PR in the near future.
In some instances, it's desirable to add custom request headers. Please consider adding headers
to the WebpageOptions
struct which can then be passed to the Easy handle in HTTP::fetch
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.