Debug & Display
Në shqip përdoret i njëjti emër.
ShpjegimiSQ
Debug ({:?}) e shfaq një vlerë për programuesin, me të gjitha detajet; Display ({}) e shfaq bukur për përdoruesin dhe duhet ta zbatosh vetë. Si toString() në Java.
EnglishEN
Debug ({:?}) shows a value for the programmer, with all its details; Display ({}) shows it nicely for the user and you implement it yourself. Like toString() in Java.
Si ta mendosh
Debug është raporti teknik; Display është përshkrimi në vitrinë.
Lexoje në anglisht
Debug is the technical report; Display is the description in the shop window.
Shembull kodirust
use std::fmt;
impl fmt::Display for Pika {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "({}, {})", self.x, self.y) }
}