1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-01-30 20:42:52 +01:00

add Io::set method for overriding param

This commit is contained in:
Nikolay Kim 2019-03-12 12:53:43 -07:00
parent ef9bfb8981
commit 7033b50fed

View File

@ -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