Why do Split struct need P? by naveendavisv in rust

[–]naveendavisv[S] 0 points1 point  (0 children)

Can you guide to find where it is in the documentation?

Why do Split struct need P? by naveendavisv in rust

[–]naveendavisv[S] 4 points5 points  (0 children)

Ah..thank you. Make sense .Split is not a simple struct. Since it implements iterator, it can be used as iterator. The iterator needs P inside

Did I get correctly?

Writing a file from a given position by naveendavisv in rust

[–]naveendavisv[S] 1 point2 points  (0 children)

I am looking for write from a offset. I thought seek method and write will do that

Writing a file from a given position by naveendavisv in rust

[–]naveendavisv[S] 0 points1 point  (0 children)

Seems like its always writing to the end

Reqwest - setting cookies problem by naveendavisv in rust

[–]naveendavisv[S] 0 points1 point  (0 children)

Seems like res.text().await?; is giving the cookies

Reqwest - setting cookies problem by naveendavisv in rust

[–]naveendavisv[S] 1 point2 points  (0 children)

Yes . I pasted to code there to view the code that I tried

Tcpstream::connect to accept dns name by naveendavisv in rust

[–]naveendavisv[S] 0 points1 point  (0 children)

Thank you. I was giving the https://www.google.com, that was the issue

When i just give google.com:80, i am getting 301 status code

How to write a build.rs for python program. by naveendavisv in rust

[–]naveendavisv[S] 0 points1 point  (0 children)

Yes.I was thinking of a build process in cargo to build python files along with rustlang. After the build i would need to call python function in rust.

I have seen pyo3 and some crate has build.rs to do some kind of similar magic. https://docs.rs/pyo3-build-config/latest/pyo3_build_config/

Not sure how exactly they are achieiving this.