Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

what is () in rust

// The () type, also called “unit”.
// The () type has exactly one value (),
// and is used when there is no other meaningful value that could be returned:

fn long() -> () {}

fn short() {}
 
PREVIOUS NEXT
Tagged: #rust
ADD COMMENT
Topic
Name
8+7 =