Analogrammer
close
프로필 배경
프로필 로고

Analogrammer

  • 분류 전체보기 (252)
    • 프로그래밍 (193)
      • C, C++ (38)
      • Rust (49)
      • JAVA (13)
      • Javascript (7)
      • Python (2)
      • Baekjoon (80)
      • React (4)
    • 보안 (29)
      • 하드웨어 해킹 (2)
      • 블록체인 (8)
      • wargame.kr (3)
      • 웹해킹 (4)
      • fuzzing (12)
    • IT (3)
      • 네트워크 (1)
      • 시스템 (2)
    • 수학 (3)
      • 이산수학 (3)
    • 영어 (2)
    • 프로젝트 (0)
    • 기타 (12)
      • 블로그 관리 (2)
      • 활동 (3)
      • 팁 (7)
    • 리뷰 (2)
    • 자격증 (4)
    • 관심IT슈 (3)
  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록

100 Exercises To Learn Rust - 5.14 source 풀기

문제 // TODO: Add a new error variant to `TicketNewError` for when the status string is invalid.// When calling `source` on an error of that variant, it should return a `ParseStatusError` rather than `None`.#[derive(Debug, thiserror::Error)]pub enum TicketNewError { #[error("Title cannot be empty")] TitleCannotBeEmpty , #[error("Title cannot be longer than 50 bytes")] TitleTooLong, ..

  • format_list_bulleted Rust
  • · 2025. 3. 18.
  • textsms

100 Exercises To Learn Rust - 5.13 try from 풀기

풀이impl TryFrom for Status { type Error = (); fn try_from(value: String) -> Result { match value.to_lowercase().as_str() { "todo" => Ok(Status::ToDo), "done" => Ok(Status::Done), "inprogress" => Ok(Status::InProgress), _ => Err(()), } }}impl TryFrom for Status { type Error = (); fn try_from(value: &str) -> Result { ma..

  • format_list_bulleted Rust
  • · 2025. 3. 18.
  • textsms

100 Exercises To Learn Rust - 5.12 ThisError 풀기

문제// TODO: Implement the `Error` trait for `TicketNewError` using `thiserror`.// We've changed the enum variants to be more specific, thus removing the need for storing// a `String` field into each variant.// You'll also have to add `thiserror` as a dependency in the `Cargo.toml` file.풀이Cargo.toml의 [dependencies]에 ThisError="2.0.12"와 같이 추가하고, TicketNewError를 다음과 같이 수정한다.#[derive(thiserror:..

  • format_list_bulleted Rust
  • · 2025. 3. 18.
  • textsms

100 Exercises To Learn Rust - 5.11 Dependencies 풀기

문제// TODO: Add `anyhow` as a dependency of this project.// Don't touch this import!// When you import a type (`Error`) from a dependency, the import path must start// with the crate name (`anyhow`, in this case).use anyhow::Error;풀이[package]name = "deps"version = "0.1.0"edition = "2021"[dependencies]anyhow = "1.0.97" Cargo.toml에 dependencies를 추가한다.

  • format_list_bulleted Rust
  • · 2025. 3. 18.
  • textsms

100 Exercises To Learn Rust - 5.10 Package 풀기

문제// This is a `main.rs` file, therefore `cargo` interprets this as the root of a binary target.// TODO: fix this broken import. Create a new library target in the `src` directory.// The library target should expose a public function named `hello_world` that takes no arguments// and returns nothing.use packages::hello_world;// This is the entrypoint of the binary.fn main() { hello_world()..

  • format_list_bulleted Rust
  • · 2025. 3. 18.
  • textsms

100 Exercises To Learn Rust - 5.9 error trait 풀기

문제 & 풀이// TODO: TicketNewError 열거형에 `Debug`, `Display`, `Error` 트레이트를 구현하세요.// `Display`를 구현할 때, `write!` 매크로를 사용하고 싶을지도 모릅니다.// `std::fmt` 모듈의 문서는 좋은 예시가 될 것입니다.// https://doc.rust-lang.org/std/fmt/index.html#write#[derive(Debug)]enum TicketNewError { TitleError(String), DescriptionError(String),}impl std::fmt::Display for TicketNewError { fn fmt(&self, f: &mut std::fmt::Formatter) ->..

  • format_list_bulleted Rust
  • · 2025. 3. 9.
  • textsms
  • navigate_before
  • 1
  • 2
  • 3
  • 4
  • ···
  • 9
  • navigate_next
공지사항
전체 카테고리
  • 분류 전체보기 (252)
    • 프로그래밍 (193)
      • C, C++ (38)
      • Rust (49)
      • JAVA (13)
      • Javascript (7)
      • Python (2)
      • Baekjoon (80)
      • React (4)
    • 보안 (29)
      • 하드웨어 해킹 (2)
      • 블록체인 (8)
      • wargame.kr (3)
      • 웹해킹 (4)
      • fuzzing (12)
    • IT (3)
      • 네트워크 (1)
      • 시스템 (2)
    • 수학 (3)
      • 이산수학 (3)
    • 영어 (2)
    • 프로젝트 (0)
    • 기타 (12)
      • 블로그 관리 (2)
      • 활동 (3)
      • 팁 (7)
    • 리뷰 (2)
    • 자격증 (4)
    • 관심IT슈 (3)
최근 글
인기 글
최근 댓글
태그
  • #tistory
  • #코딩
  • #프로젝트오일러
  • #프로그래밍
  • #연습문제
  • #파이썬
  • #C언어
  • #백준
  • #코딩테스트
  • #문제풀이
전체 방문자
오늘
어제
전체
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바

개인정보

  • 티스토리 홈
  • 포럼
  • 로그인

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.