这是我的html标签:
<input class="editable-input" ng-model="ac.accesses.permision.alias" ng-disabled="true">
Run Code Online (Sandbox Code Playgroud)
但输入标签不会禁用。
如何在 Rust 函数中返回 Null?
#[derive(Debug, Clone)]
struct NodeValue {
id: String,
parent: String,
children: Vec<NodeValue>,
}
impl NodeValue {
fn find_parent(&self, id: &mut String) -> &NodeValue {
if self.id == *id {
println!("{},{}", self.id, id);
return self;
}
for child in &self.children {
println!("{:?}", child);
let res = child.find_parent(id);
return res;
}
return null; //return null
}
}
fn main() {
let root = NodeValue {
id: "#".to_string(),
parent: String::from("root"),
children: vec![],
};
let id = "1";
let mut parent …Run Code Online (Sandbox Code Playgroud)