Struct libp2prs_core::multistream::Negotiator [−][src]
pub struct Negotiator<TProto> { /* fields omitted */ }
Implementations
impl<TProto: AsRef<[u8]> + Clone + Debug> Negotiator<TProto>
[src]
pub fn new_with_protocols<Iter>(protocols: Iter) -> Self where
Iter: IntoIterator<Item = TProto>,
[src]
Iter: IntoIterator<Item = TProto>,
pub fn add_protocol(&mut self, proto: TProto) -> Result<(), ProtocolError>
[src]
pub async fn negotiate<TSocket>(
&self,
socket: TSocket
) -> Result<(TProto, TSocket), NegotiationError> where
TSocket: AsyncRead + AsyncWrite + Unpin,
[src]
&self,
socket: TSocket
) -> Result<(TProto, TSocket), NegotiationError> where
TSocket: AsyncRead + AsyncWrite + Unpin,
pub async fn select_one<TSocket>(
&self,
socket: TSocket
) -> Result<(TProto, TSocket), NegotiationError> where
TSocket: AsyncRead + AsyncWrite + Unpin,
[src]
&self,
socket: TSocket
) -> Result<(TProto, TSocket), NegotiationError> where
TSocket: AsyncRead + AsyncWrite + Unpin,
Trait Implementations
impl<TProto> Default for Negotiator<TProto>
[src]
Auto Trait Implementations
impl<TProto> RefUnwindSafe for Negotiator<TProto> where
TProto: RefUnwindSafe,
TProto: RefUnwindSafe,
impl<TProto> Send for Negotiator<TProto> where
TProto: Send,
TProto: Send,
impl<TProto> Sync for Negotiator<TProto> where
TProto: Sync,
TProto: Sync,
impl<TProto> Unpin for Negotiator<TProto> where
TProto: Unpin,
TProto: Unpin,
impl<TProto> UnwindSafe for Negotiator<TProto> where
TProto: UnwindSafe,
TProto: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,