• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tari-project / tari / 15613133816

12 Jun 2025 02:20PM UTC coverage: 72.049% (-0.1%) from 72.172%
15613133816

push

github

web-flow
chore: new release v4.1.1-pre.0 (#7211)

Description
---
new release esme

81675 of 113360 relevant lines covered (72.05%)

243498.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

37.5
/comms/core/src/multiplexing/error.rs
1
// Copyright 2019, The Tari Project
2
//
3
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
4
// following conditions are met:
5
//
6
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
7
// disclaimer.
8
//
9
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
10
// following disclaimer in the documentation and/or other materials provided with the distribution.
11
//
12
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
13
// products derived from this software without specific prior written permission.
14
//
15
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
16
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
20
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
21
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22

23
use futures::channel::oneshot::Canceled;
24
use thiserror::Error;
25
use tokio::sync::mpsc::error::SendError;
26
use yamux::ConnectionError;
27

28
/// Error type for PeerConnection
29
#[derive(Debug, Error, Clone)]
30
pub enum YamuxControlError {
31
    #[error("Yamux connection error: {0}")]
32
    ConnectionError(String),
33
    #[error("Yamux connection closed")]
34
    ConnectionClosed,
35
    #[error("Yamux request send error: {0}")]
36
    RequestSendError(String),
37
    #[error("Yamux request send error: {0}")]
38
    RequestCanceled(#[from] Canceled),
39
}
40

41
impl From<ConnectionError> for YamuxControlError {
42
    fn from(err: ConnectionError) -> Self {
×
43
        match err {
×
44
            ConnectionError::Closed => Self::ConnectionClosed,
×
45
            _ => Self::ConnectionError(err.to_string()),
×
46
        }
47
    }
×
48
}
49

50
impl<T> From<SendError<T>> for YamuxControlError {
51
    fn from(err: SendError<T>) -> Self {
161✔
52
        Self::RequestSendError(err.to_string())
161✔
53
    }
161✔
54
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc