Spawn External Processes with Rust Standard Library 🦀 Rust Programming Tutorial for Developers

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ธ.ค. 2024

ความคิดเห็น • 8

  • @TrevorSullivan
    @TrevorSullivan  ปีที่แล้ว +1

    Please help support more videos by shopping on my Amazon storefront! 📦 www.amazon.com/shop/trevorsullivan

  • @SpaceDandy_VT
    @SpaceDandy_VT หลายเดือนก่อน

    great video, subscribed 👍

  • @mohaniya15
    @mohaniya15 ปีที่แล้ว

    Love your videos. I just started making Rust videos a while back, your videos really help.

  • @shreyaskarthik2185
    @shreyaskarthik2185 8 หลายเดือนก่อน

    Clear and consice , thank you so much i learnt a lot

    • @TrevorSullivan
      @TrevorSullivan  8 หลายเดือนก่อน +1

      I'm so happy to hear that! Thank you for letting me know. Keep on learning and practicing Rust!

  • @TechLord79
    @TechLord79 8 หลายเดือนก่อน

    head reads lines and is waiting for input to end because "inputtwo" is not line-terminated -> "inputone
    inputtwo
    " should do

  • @coderswat
    @coderswat ปีที่แล้ว

    nice vid

  • @eqtraderagent9960
    @eqtraderagent9960 ปีที่แล้ว

    Outstanding! #DeskChecking
    cargo run
    Compiling life v0.1.0 (/home/alone/life)
    Finished dev [unoptimized + debuginfo] target(s) in 0.35s
    Running `/home/alone/life/target/debug/life`
    Was execution successful? true
    use std::process::Command;
    use std::process::Output;
    use std::error::Error;
    fn main() {
    let mut p1: Command = Command::new("which");
    p1.arg("python3");
    let proc_result: Result = p1.output().map_err(|e| e.into());
    if proc_result.is_ok() {
    let result: Output = proc_result.unwrap();
    println!("Was execution successful? {}", result.status.success());
    if !result.status.success() {
    println!("Error occurred: {}", result.status.code().unwrap());
    }
    }
    }