{"schemaVersion":1,"title":"Rust · rustdoc","url":"https://appgram.github.io/docsy/versions/current/fr/rust-sdk","markdownUrl":"https://appgram.github.io/docsy/format-md/versions/current/fr/rust-sdk","jsonUrl":"https://appgram.github.io/docsy/agent/pages/versions/current/fr/rust-sdk.json","version":"current","locale":"fr","markdown":"# Rust · rustdoc\n\nReal stable rustdoc HTML output from the checked-in rust fixture source. Generated artifacts, commands, versions, and SHA-256 hashes are recorded under sources/native. This is a teaching library, not a published SDK.\n\n> Source: https://appgram.github.io/docsy/versions/current/fr/rust-sdk  \n> Language: rust  \n> Symbols: 19 across 3 categories\n\n## Categories\n\n- [Enums](#enums) — 1 items\n- [Methods](#methods) — 17 items\n- [Structs](#structs) — 1 items\n\n## Enums\n\n### `GreetingError`  <sub>enum</sub>\n\nValidation failures returned by the greeting API.\n\n**Values** — `EmptyName`\n\n```rust\npub enum GreetingError { EmptyName, }\n```\n\n## Methods\n\n### `borrow`  <sub>method</sub>\n\nSource § fn borrow (&self) -> &T Immutably borrows from an owned value. Read more\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `self` | `unknown` | ✓ |  |\n\n**Returns** — `&T`\n\n```rust\nfn borrow(&self) -> &T\n```\n\n---\n\n### `borrow`  <sub>method</sub>\n\nSource § fn borrow (&self) -> &T Immutably borrows from an owned value. Read more\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `self` | `unknown` | ✓ |  |\n\n**Returns** — `&T`\n\n```rust\nfn borrow(&self) -> &T\n```\n\n---\n\n### `borrow_mut`  <sub>method</sub>\n\nSource § fn borrow_mut (&mut self) -> &mut T Mutably borrows from an owned value. Read more\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `self` | `&mut` | ✓ |  |\n\n**Returns** — `&mut T`\n\n```rust\nfn borrow_mut(&mut self) -> &mut T\n```\n\n---\n\n### `borrow_mut`  <sub>method</sub>\n\nSource § fn borrow_mut (&mut self) -> &mut T Mutably borrows from an owned value. Read more\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `self` | `&mut` | ✓ |  |\n\n**Returns** — `&mut T`\n\n```rust\nfn borrow_mut(&mut self) -> &mut T\n```\n\n---\n\n### `from`  <sub>method</sub>\n\nReturns the argument unchanged.\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `t` | `T` | ✓ |  |\n\n**Returns** — `T`\n\n```rust\nfn from(t: T) -> T\n```\n\n---\n\n### `from`  <sub>method</sub>\n\nReturns the argument unchanged.\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `t` | `T` | ✓ |  |\n\n**Returns** — `T`\n\n```rust\nfn from(t: T) -> T\n```\n\n---\n\n### `greet`  <sub>method</sub>\n\nGreet a reader.\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `name` | `&str` | ✓ |  |\n\n**Returns** — `String`\n\n```rust\npub fn greet(name: &str) -> String\n```\n\n**Example**\n\n```rust\nlet greeting = greeter::Greeter::greet(\"Docsy\");\n```\n\n---\n\n### `greet_checked`  <sub>method</sub>\n\nReject an empty reader name.\n\n**Errors**\n\n- `Result::Err` — Returns GreetingError::EmptyName when name is empty.\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `name` | `&str` | ✓ |  |\n\n**Returns** — `Result<String, GreetingError>`\n\n```rust\npub fn greet_checked(name: &str) -> Result<String, GreetingError>\n```\n\n**Example**\n\n```rust\nassert!(greeter::Greeter::greet_checked(\"\").is_err());\n```\n\n---\n\n### `greet_many`  <sub>method</sub>\n\nGreet several readers while preserving input order.\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `names` | `&[&str]` | ✓ |  |\n\n**Returns** — `Vec<String>`\n\n```rust\npub fn greet_many(names: &[&str]) -> Vec<String>\n```\n\n**Example**\n\n```rust\nlet greetings = greeter::Greeter::greet_many(&[\"Ada\", \"Linus\"]);\nassert_eq!(greetings.len(), 2);\n```\n\n---\n\n### `into`  <sub>method</sub>\n\nCalls U::from(self) .\n\n**Returns** — `U`\n\n```rust\nfn into(self) -> U\n```\n\n---\n\n### `into`  <sub>method</sub>\n\nCalls U::from(self) .\n\n**Returns** — `U`\n\n```rust\nfn into(self) -> U\n```\n\n---\n\n### `try_from`  <sub>method</sub>\n\nSource § fn try_from (value: U) -> Result <T, <T as TryFrom <U>>:: Error > Performs the conversion.\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `value` | `U` | ✓ |  |\n\n**Returns** — `Result<T, <T as TryFrom<U>>::Error>`\n\n```rust\nfn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>\n```\n\n---\n\n### `try_from`  <sub>method</sub>\n\nSource § fn try_from (value: U) -> Result <T, <T as TryFrom <U>>:: Error > Performs the conversion.\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `value` | `U` | ✓ |  |\n\n**Returns** — `Result<T, <T as TryFrom<U>>::Error>`\n\n```rust\nfn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>\n```\n\n---\n\n### `try_into`  <sub>method</sub>\n\nSource § fn try_into (self) -> Result <U, <U as TryFrom <T>>:: Error > Performs the conversion.\n\n**Returns** — `Result<U, <U as TryFrom<T>>::Error>`\n\n```rust\nfn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>\n```\n\n---\n\n### `try_into`  <sub>method</sub>\n\nSource § fn try_into (self) -> Result <U, <U as TryFrom <T>>:: Error > Performs the conversion.\n\n**Returns** — `Result<U, <U as TryFrom<T>>::Error>`\n\n```rust\nfn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>\n```\n\n---\n\n### `type_id`  <sub>method</sub>\n\nSource § fn type_id (&self) -> TypeId Gets the TypeId of self . Read more\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `self` | `unknown` | ✓ |  |\n\n**Returns** — `TypeId`\n\n```rust\nfn type_id(&self) -> TypeId\n```\n\n---\n\n### `type_id`  <sub>method</sub>\n\nSource § fn type_id (&self) -> TypeId Gets the TypeId of self . Read more\n\n**Parameters**\n\n| Name | Type | Required | Description |\n\n| --- | --- | --- | --- |\n\n| `self` | `unknown` | ✓ |  |\n\n**Returns** — `TypeId`\n\n```rust\nfn type_id(&self) -> TypeId\n```\n\n## Structs\n\n### `Greeter`  <sub>struct</sub>\n\nBuild personalized greetings without network access.\n\n**Properties**\n\n| Name | Type | Required | Description | Default |\n\n| --- | --- | --- | --- | --- |\n\n| `prefix` | `String` | ✓ |  |  |\n\n```rust\npub struct Greeter { pub prefix: String, }\n```\n\n**Example**\n\n```rust\nlet greeting = greeter::Greeter::greet(\"Docsy\");\nassert_eq!(greeting, \"Hello, Docsy\");\n```\n"}