Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Corelib
!
pub trait Not
Not
Answer
#[derive(Drop, PartialEq)] enum Answer { Yes, No, } impl AnswerNot of Not { fn not(a: Answer) -> Answer { match a { Answer::Yes => Answer::No, Answer::No => Answer::Yes, } } } assert!(!Answer::Yes == Answer::No); assert!(!Answer::No == Answer::Yes);
fn not(a: T) -> T
assert!(!true == false); assert!(!false == true);
Was this page helpful?