Rust

Attributes in Rust (#[...])

Në shqip: Atributet në Rust

ShpjegimiSQ

Atributet #[...] u japin udhëzime kompajlerit: #[derive(Debug)] gjeneron kod, #[test] shënon teste, #[allow(dead_code)] fsheh paralajmërime, #[cfg(test)] përfshin kod vetëm në teste.

EnglishEN

Attributes #[...] give the compiler instructions: #[derive(Debug)] generates code, #[test] marks tests, #[allow(dead_code)] silences warnings, #[cfg(test)] includes code only in tests.

Si ta mendosh

Si shënimet speciale në kopertinë të dosjes.

Lexoje në anglisht

Like special notes on a folder's cover.

Shembull kodirust

#[derive(Debug, Clone)]
#[allow(dead_code)]
struct Nxenes { emri: String }

Terma të lidhur