Debian Codegraph @

third_party/rust/cubeb-sys/src/internal.rs

raw
1 // Copyright © 2017-2018 Mozilla Foundation
2 //
3 // This program is made available under an ISC-style license. See the
4 // accompanying file LICENSE for details.
5
6 use std::{fmt, mem};
7 use std::os::raw::{c_char, c_uint};
8
9 #[repr(C)]
10 pub struct cubeb_layout_map {
11 name: *const c_char,
12 channels: c_uint,
13 layout: cubeb_channel_layout,
14 }
15
16 impl Default for cubeb_layout_map {
17 fn default() -> Self { unsafe { mem::zeroed() } }
18 }
19
20 // Explicit Debug impl to work around bug in ctest
21 impl fmt::Debug for cubeb_layout_map {
22 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
23 f.debug_struct("cubeb_layout_map")
24 .field("name", &self.name)
25 .field("channels", &self.channels)
26 .field("layout", &self.layout)
27 .finish()
28 }
29 }