pub struct Channels<T = Vec<u8>> { /* private fields */ }
Expand description
Worker channels for communicating through the git stream with the remote.
Implementations§
Source§impl<T: AsRef<[u8]>> Channels<T>
impl<T: AsRef<[u8]>> Channels<T>
pub fn new( sender: Sender<ChannelEvent<T>>, receiver: Receiver<ChannelEvent<T>>, config: ChannelsConfig, ) -> Self
pub fn pair(config: ChannelsConfig) -> Result<(Channels<T>, Channels<T>)>
pub fn try_iter(&self) -> impl Iterator<Item = ChannelEvent<T>> + '_
pub fn send(&self, event: ChannelEvent<T>) -> Result<()>
pub fn close(self) -> Result<(), SendError<ChannelEvent<T>>>
Auto Trait Implementations§
impl<T> Freeze for Channels<T>
impl<T> RefUnwindSafe for Channels<T>
impl<T> Send for Channels<T>where
T: Send,
impl<T> Sync for Channels<T>where
T: Send,
impl<T> Unpin for Channels<T>where
T: Unpin,
impl<T> UnwindSafe for Channels<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more