프로젝트에서 RSS 상자를 사용하려고했습니다. rss = "1.5.0"
Cargo.toml의 종속성을 추가 하고 코드를 빌드했습니다.
extern crate regex;
extern crate rss;
use rss::Channel;
fn main() {
let channel = Channel::from_url("https://feedpress.me/usererror.xml");
}
화물 빌드를 실행할 때 다음 오류가 발생합니다.
$ cargo build
Compiling rss_f v0.1.0 (file:///home/philippe/test/rss_f)
error[E0599]: no function or associated item named `from_url` found for type `rss::Channel` in the current scope
--> src/main.rs:7:19
|
7 | let channel = Channel::from_url("https://feedpress.me/usererror.xml");
| ^^^^^^^^^^^^^^^^^ function or associated item not found in `rss::Channel`
VScode에서 함수를 강조 표시 할 때 RLS에서 오류가 발생하고 동시에 Racer가 함수 정의를 제공합니다. 따라서 상자가 설치되어 있지만 Cargo는 사용할 수 없습니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다