mirror of
https://github.com/fafhrd91/actix-net
synced 2025-01-30 19:32:53 +01:00
add Io::set method for overriding param
This commit is contained in:
parent
ef9bfb8981
commit
7033b50fed
@ -89,6 +89,15 @@ impl<T, P> Io<T, P> {
|
||||
self.proto
|
||||
}
|
||||
|
||||
/// Return new Io object with new parameter.
|
||||
pub fn set<U>(self, params: U) -> Io<T, U> {
|
||||
Io {
|
||||
io: self.io,
|
||||
proto: self.proto,
|
||||
params: params,
|
||||
}
|
||||
}
|
||||
|
||||
/// Maps an Io<_, P> to Io<_, U> by applying a function to a contained value.
|
||||
pub fn map<U, F>(self, op: F) -> Io<T, U>
|
||||
where
|
||||
|
Loading…
x
Reference in New Issue
Block a user