[go: up one dir, main page]

objc2-core-foundation 0.3.1

Bindings to the CoreFoundation framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![cfg(feature = "CFString")]
use core::fmt;

use crate::CFError;

impl fmt::Display for CFError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        let desc = self.description().unwrap();
        write!(f, "{desc}")
    }
}

#[cfg(feature = "std")] // use core::error::Error from Rust 1.81 once in MSRV.
impl std::error::Error for CFError {}