Skip to main content

One post tagged with "methods"

View All Tags

wKevin

将 rust 标准库中的几个常用类型的方法安装第一个入参(即:Move、借用、可变借用)分组整理,以便开发时做个参考。

Type(..)(self..)(&self..)(&mut self..)
Cowfrom()into_owned()to_mut()
Cellfrom()
from_mut()
new()
into_inner()set()
get()
take()
replace()
get_mut()
RefCellfrom()
new()
into_inner()borrow()
borrow_mut()
take()
replace()
get_mut()
Vecfrom()
new()
with_capacity()
into_boxed_slice()len()
capacity()
is_empyt()
insert()
append()
push()
pop()
remove()
drain()
clear()
splice()
reserve()
resize()
shrink_to()
truncate()
BTreeMapfrom()
new()
into_keys()
range()
get()
len()
keys()
values()
iter()
get_key_value()
first_key_value()
last_key_value()
contains_key()
is_empyt()
insert()
append()
extend
retain()
remove()
pop_first()
pop_last()
entry()
first_entry()
last_entry()
HashMapfrom()
new()
keys()
into_keys()
capacity()
get()
len()
values()
iter()
is_empty()
insert()
extend
retain()
drain()
remove()
remove_entry()
reserve()
entry()
Boxfrom()
new()
leak()
pin()
downcast()
split()
borrow()borrow_mut()
consume()
read_line()