Path: blob/main/audio_streams_conformance_test/src/error.rs
5392 views
// Copyright 2022 The ChromiumOS Authors1// Use of this source code is governed by a BSD-style license that can be2// found in the LICENSE file.34use std::io;56use audio_streams::BoxError;7use remain::sorted;8use thiserror::Error;910pub type Result<T> = std::result::Result<T, Error>;1112#[sorted]13#[derive(Error, Debug)]14pub enum Error {15/// Creating stream failed.16#[error(transparent)]17CreateStream(BoxError),18#[error(transparent)]19FetchBuffer(BoxError),20#[error("failed to generate stream source: {0}")]21GenerateStreamSource(BoxError),22#[allow(dead_code)]23#[error("invalid stream source: `{0}`")]24InvalidStreamSuorce(String),25#[error("mismatched x[] and y[] for linear regression")]26MismatchedSamples,27#[error("do not have enough samples")]28NotEnoughSamples,29#[error(transparent)]30SerdeError(#[from] serde_json::Error),31#[error(transparent)]32WriteBuffer(io::Error),33}343536