Lines Matching +full:build +full:- +full:deprecated
1 // SPDX-License-Identifier: GPL-2.0-or-later
14 //! [`ptr_or_propagate`](crate::Error::ptr_or_propagate) can be used to build
18 //! [`err_or_unit`](crate::Error::err_or_unit) can be used to build a `Result`
60 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { in source()
64 #[allow(deprecated)]
65 fn description(&self) -> &str { in description()
74 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { in fmt()
91 fn from(msg: String) -> Self { in from()
104 fn from(msg: &'static str) -> Self { in from()
117 fn from(error: anyhow::Error) -> Self { in from()
132 pub fn with_error(msg: impl Into<Cow<'static, str>>, cause: impl Into<anyhow::Error>) -> Self { in with_error()
151 pub unsafe fn bool_or_propagate(result: Result<()>, errp: *mut *mut bindings::Error) -> bool { in bool_or_propagate()
172 ) -> *mut T::Foreign { in ptr_or_propagate()
191 ) -> Option<T> { in ok_or_propagate()
231 pub unsafe fn err_or_unit(c_error: *mut bindings::Error) -> Result<()> { in err_or_unit()
244 pub unsafe fn err_or_else<T, F: FnOnce() -> T>( in err_or_else()
247 ) -> Result<T> { in err_or_else()
269 fn clone_to_foreign(&self) -> OwnedPointer<Self> { in clone_to_foreign()
289 unsafe fn cloned_from_foreign(c_error: *const bindings::Error) -> Self { in cloned_from_foreign()
294 // NUL-terminated in cloned_from_foreign()
325 fn error_for_test(msg: &CStr) -> OwnedPointer<Error> { in error_for_test()
344 unsafe fn error_get_pretty<'a>(local_err: *mut bindings::Error) -> &'a CStr { in error_get_pretty()
349 #[allow(deprecated)]