rust: function
///file: nestd.rs
///ide: RustRover 233.8264.22
///
///
///
/**
*自定义函数
*/
pub fn function() {
println!("called `my::nested::function()`");
}
#[allow(dead_code)]
fn private_function() {
println!("called `my::nested::private_function()`");
}
///file: naccessible.rs
///ide: RustRover 233.8264.22
///
///
///
/**
*
*/
#[allow(dead_code)]
pub fn public_function() {
println!("called `my::inaccessible::public_function()`");
}
/**
* 自定义涵数(方法)
*/
pub fn geovindu_fuction()
{
println!("hi,geovindu,塗聚文");
}
///file: Tujuwen.rs
///ide: RustRover 233.8264.22
///
///
/**
*中文显示
*/
pub fn display()
{
println!("hi, I am geovindu,我是塗聚文");
}
///file: Du.rs
///ide: RustRover 233.8264.22
///
pub mod inaccessible; //公用,另外文件才可以调用,否则,成了私有
pub mod nested;
pub mod Tujuwen;
/**
*公有自定池数
*/
pub fn function() {
println!("called `my::function()`");
}
/**
*私有 自定池数
*/
fn private_function() {
println!("called `my::private_function()`");
}
/**
*公有自定池数
*/
pub fn indirect_access() {
print!("called `my::indirect_access()`, that\n> ");
private_function();
}
///file: main.rs
///ide: RustRover 233.8264.22
///
mod du;
/**
* 输出
*/
fn main() {
println!("Hello, rust world!,涂聚文 ,Geovin Du");
let numbers: [u8; 10] = [1, 2, 3, 4, 5, 7, 8, 9, 10, 11];
let floats = [0.1f64, 0.2, 0.3];
println!("Number: {}", numbers[5]);
println!("Float: {}", floats[2]);
du::function();
du::indirect_access();
du::inaccessible::geovindu_fuction();
du::nested::function();
du::Tujuwen::display();
}


https://www.ituring.com.cn/search/result?q=JavaScript
https://www.epubit.com/search?type=goods&keyword=javascript
https://www.epubit.com/search?type=goods&keyword=rust
https://www.ituring.com.cn/search/result?q=rust
哲学管理(学)人生, 文学艺术生活, 自动(计算机学)物理(学)工作, 生物(学)化学逆境, 历史(学)测绘(学)时间, 经济(学)数学金钱(理财), 心理(学)医学情绪, 诗词美容情感, 美学建筑(学)家园, 解构建构(分析)整合学习, 智商情商(IQ、EQ)运筹(学)生存.---Geovin Du(涂聚文)
浙公网安备 33010602011771号