@@ -6,7 +6,7 @@ pub trait Transfer<W> {
6
6
type Error ;
7
7
8
8
/// Sends `words` to the slave. Returns the `words` received from the slave
9
- fn transfer < ' w > ( & mut self , words : & ' w mut [ W ] ) -> Result < & ' w [ W ] , Self :: Error > ;
9
+ fn try_transfer < ' w > ( & mut self , words : & ' w mut [ W ] ) -> Result < & ' w [ W ] , Self :: Error > ;
10
10
}
11
11
12
12
/// Blocking write
@@ -15,7 +15,7 @@ pub trait Write<W> {
15
15
type Error ;
16
16
17
17
/// Sends `words` to the slave, ignoring all the incoming words
18
- fn write ( & mut self , words : & [ W ] ) -> Result < ( ) , Self :: Error > ;
18
+ fn try_write ( & mut self , words : & [ W ] ) -> Result < ( ) , Self :: Error > ;
19
19
}
20
20
21
21
/// Blocking write (iterator version)
@@ -25,7 +25,7 @@ pub trait WriteIter<W> {
25
25
type Error ;
26
26
27
27
/// Sends `words` to the slave, ignoring all the incoming words
28
- fn write_iter < WI > ( & mut self , words : WI ) -> Result < ( ) , Self :: Error >
28
+ fn try_write_iter < WI > ( & mut self , words : WI ) -> Result < ( ) , Self :: Error >
29
29
where
30
30
WI : IntoIterator < Item = W > ;
31
31
}
@@ -43,7 +43,7 @@ pub mod transfer {
43
43
{
44
44
type Error = S :: Error ;
45
45
46
- fn transfer < ' w > ( & mut self , words : & ' w mut [ W ] ) -> Result < & ' w [ W ] , S :: Error > {
46
+ fn try_transfer < ' w > ( & mut self , words : & ' w mut [ W ] ) -> Result < & ' w [ W ] , S :: Error > {
47
47
for word in words. iter_mut ( ) {
48
48
block ! ( self . send( word. clone( ) ) ) ?;
49
49
* word = block ! ( self . read( ) ) ?;
@@ -66,7 +66,7 @@ pub mod write {
66
66
{
67
67
type Error = S :: Error ;
68
68
69
- fn write ( & mut self , words : & [ W ] ) -> Result < ( ) , S :: Error > {
69
+ fn try_write ( & mut self , words : & [ W ] ) -> Result < ( ) , S :: Error > {
70
70
for word in words {
71
71
block ! ( self . send( word. clone( ) ) ) ?;
72
72
block ! ( self . read( ) ) ?;
@@ -91,7 +91,7 @@ pub mod write_iter {
91
91
{
92
92
type Error = S :: Error ;
93
93
94
- fn write_iter < WI > ( & mut self , words : WI ) -> Result < ( ) , S :: Error >
94
+ fn try_write_iter < WI > ( & mut self , words : WI ) -> Result < ( ) , S :: Error >
95
95
where
96
96
WI : IntoIterator < Item = W > ,
97
97
{
0 commit comments