Home
last modified time | relevance | path

Searched refs:AllocError (Results 1 – 19 of 19) sorted by relevance

/linux/rust/kernel/
H A Dmaple_tree.rs192 InsertErrorKind::AllocError(kernel::alloc::AllocError) in insert_range()
446 ) -> Result<usize, AllocError<T>> in alloc_range()
451 return Err(AllocError { in alloc_range()
478 AllocErrorKind::AllocError(kernel::alloc::AllocError) in alloc_range()
484 Err(AllocError { value, cause }) in alloc_range()
598 AllocError(kernel::alloc::AllocError), enumerator
608 InsertErrorKind::AllocError(kernel::alloc::AllocError) => ENOMEM, in from()
622 pub struct AllocError<T> { struct
635 AllocError(kernel::alloc::AllocError), enumerator
645 AllocErrorKind::AllocError(kernel::alloc::AllocError) => ENOMEM, in from()
[all …]
H A Dbitmap.rs9 use crate::alloc::{AllocError, Flags};
245 /// Fails with [`AllocError`] when the [`BitmapVec`] could not be allocated. This
248 pub fn new(nbits: usize, flags: Flags) -> Result<Self, AllocError> { in new() argument
256 return Err(AllocError); in new()
261 let ptr = NonNull::new(ptr).ok_or(AllocError)?; in new()
400 /// use kernel::alloc::{AllocError, flags::GFP_KERNEL};
413 /// # Ok::<(), AllocError>(())
434 /// use kernel::alloc::{AllocError, flags::GFP_KERNEL};
447 /// # Ok::<(), AllocError>(())
528 fn bitmap_vec_new() -> Result<(), AllocError> {
[all...]
H A Dstr.rs7 AllocError,
245 fn to_cstring(&self) -> Result<CString, AllocError>;
278 fn to_ascii_lowercase(&self) -> Result<CString, AllocError>;
289 fn to_ascii_uppercase(&self) -> Result<CString, AllocError>;
357 fn to_cstring(&self) -> Result<CString, AllocError> {
371 fn to_ascii_lowercase(&self) -> Result<CString, AllocError> { in to_ascii_uppercase()
379 fn to_ascii_uppercase(&self) -> Result<CString, AllocError> { in as_ref()
901 type Error = AllocError; in fmt()
903 fn try_from(cstr: &'a CStr) -> Result<CString, AllocError> { in fmt()
232 to_cstring(&self) -> Result<CString, AllocError> to_cstring() argument
265 to_ascii_lowercase(&self) -> Result<CString, AllocError> to_ascii_lowercase() argument
276 to_ascii_uppercase(&self) -> Result<CString, AllocError> to_ascii_uppercase() argument
344 to_cstring(&self) -> Result<CString, AllocError> to_cstring() argument
358 to_ascii_lowercase(&self) -> Result<CString, AllocError> to_ascii_lowercase() argument
366 to_ascii_uppercase(&self) -> Result<CString, AllocError> to_ascii_uppercase() argument
889 try_from(cstr: &'a CStr) -> Result<CString, AllocError> try_from() argument
H A Dinit.rs129 alloc::{AllocError, Flags},
148 E: From<AllocError>; in try_pin_init() argument
169 E: From<AllocError>;
168 try_init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> where E: From<AllocError> try_init() argument
H A Did_pool.rs7 use crate::alloc::{AllocError, Flags};
89 pub fn realloc(&self, flags: Flags) -> Result<PoolResizer, AllocError> { in realloc() argument
114 pub fn with_capacity(num_ids: usize, flags: Flags) -> Result<Self, AllocError> { in with_capacity() argument
H A Dalloc.rs23 pub struct AllocError; struct
188 fn alloc(layout: Layout, flags: Flags, nid: NumaNode) -> Result<NonNull<[u8]>, AllocError> { in alloc()
233 /// - when the return value is `Err(AllocError)`, then `ptr` is still valid. in realloc()
240 ) -> Result<NonNull<[u8]>, AllocError>;
184 alloc(layout: Layout, flags: Flags, nid: NumaNode) -> Result<NonNull<[u8]>, AllocError> alloc() argument
236 realloc( ptr: Option<NonNull<u8>>, layout: Layout, old_layout: Layout, flags: Flags, nid: NumaNode, ) -> Result<NonNull<[u8]>, AllocError> realloc() argument
H A Derror.rs10 alloc::{layout::LayoutError, AllocError},
217 impl From<AllocError> for Error {
219 fn from(_: AllocError) -> Error { in from()
/linux/rust/pin-init/src/
H A Dalloc.rs6 use core::alloc::AllocError;
12 type AllocError = core::convert::Infallible; typedef
32 E: From<AllocError>; in try_pin_init() argument
38 fn pin_init(init: impl PinInit<T>) -> Result<Pin<Self>, AllocError> { in pin_init() argument
52 E: From<AllocError>; in try_init() argument
55 fn init(init: impl Init<T>) -> Result<Self, AllocError> { in init() argument
84 E: From<AllocError>, in try_pin_init() argument
92 E: From<AllocError>, in try_init() argument
102 E: From<AllocError>, in try_pin_init() argument
120 E: From<AllocError>, in try_init() argument
/linux/rust/kernel/alloc/
H A Dallocator.rs12 AllocError,
102 ) -> Result<NonNull<[u8]>, AllocError> { in call()
131 NonNull::new(raw_ptr).ok_or(AllocError)? in aligned_layout()
163 ) -> Result<NonNull<[u8]>, AllocError> {
236 ) -> Result<NonNull<[u8]>, AllocError> {
257 ) -> Result<NonNull<[u8]>, AllocError> {
91 call( &self, ptr: Option<NonNull<u8>>, layout: Layout, old_layout: Layout, flags: Flags, nid: NumaNode, ) -> Result<NonNull<[u8]>, AllocError> call() argument
152 realloc( ptr: Option<NonNull<u8>>, layout: Layout, old_layout: Layout, flags: Flags, nid: NumaNode, ) -> Result<NonNull<[u8]>, AllocError> realloc() argument
222 realloc( ptr: Option<NonNull<u8>>, layout: Layout, old_layout: Layout, flags: Flags, nid: NumaNode, ) -> Result<NonNull<[u8]>, AllocError> realloc() argument
243 realloc( ptr: Option<NonNull<u8>>, layout: Layout, old_layout: Layout, flags: Flags, nid: NumaNode, ) -> Result<NonNull<[u8]>, AllocError> realloc() argument
H A Dkvec.rs13 AllocError,
351 pub fn push(&mut self, v: T, flags: Flags) -> Result<(), AllocError> { in push_within_capacity()
527 pub fn with_capacity(capacity: usize, flags: Flags) -> Result<Self, AllocError> {
648 pub fn reserve(&mut self, additional: usize, flags: Flags) -> Result<(), AllocError> { in reserve()
658 return Err(AllocError); in reserve()
663 let new_cap = core::cmp::max(cap * 2, len.checked_add(additional).ok_or(AllocError)?); in reserve()
664 let layout = ArrayLayout::new(new_cap).map_err(|_| AllocError)?; in reserve()
789 pub fn shrink_to(&mut self, min_capacity: usize, flags: Flags) -> Result<(), AllocError> { in shrink_to()
805 let new_layout = ArrayLayout::<T>::new(target_cap).map_err(|_| AllocError)?; in shrink_to()
893 pub fn extend_with(&mut self, n: usize, value: T, flags: Flags) -> Result<(), AllocError> { in extend_from_slice()
328 push(&mut self, v: T, flags: Flags) -> Result<(), AllocError> push() argument
504 with_capacity(capacity: usize, flags: Flags) -> Result<Self, AllocError> with_capacity() argument
625 reserve(&mut self, additional: usize, flags: Flags) -> Result<(), AllocError> reserve() argument
766 shrink_to(&mut self, min_capacity: usize, flags: Flags) -> Result<(), AllocError> shrink_to() argument
852 extend_with(&mut self, n: usize, value: T, flags: Flags) -> Result<(), AllocError> extend_with() argument
891 extend_from_slice(&mut self, other: &[T], flags: Flags) -> Result<(), AllocError> extend_from_slice() argument
907 from_elem(value: T, n: usize, flags: Flags) -> Result<Self, AllocError> from_elem() argument
932 resize(&mut self, new_len: usize, value: T, flags: Flags) -> Result<(), AllocError> resize() argument
[all...]
H A Dkbox.rs14 AllocError,
254 pub fn new(x: T, flags: Flags) -> Result<Self, AllocError> {
273 pub fn new_uninit(flags: Flags) -> Result<Box<MaybeUninit<T>, A>, AllocError> {
294 pub fn zeroed(flags: Flags) -> Result<Self, AllocError>
306 pub fn pin(x: T, flags: Flags) -> Result<Pin<Box<T, A>>, AllocError>
366 E: From<AllocError>, in pin_slice()
491 E: From<AllocError>,
499 E: From<AllocError>,
256 new(x: T, flags: Flags) -> Result<Self, AllocError> new() argument
275 new_uninit(flags: Flags) -> Result<Box<MaybeUninit<T>, A>, AllocError> new_uninit() argument
344 pin_slice<Func, Item, E>( mut init: Func, len: usize, flags: Flags, ) -> Result<Pin<Box<[T], A>>, E> where Func: FnMut(usize) -> Item, Item: PinInit<T, E>, E: From<AllocError>, pin_slice() argument
467 try_pin_init<E>(init: impl PinInit<T, E>, flags: Flags) -> Result<Pin<Self>, E> where E: From<AllocError>, try_pin_init() argument
475 try_init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> where E: From<AllocError>, try_init() argument
/linux/drivers/android/binder/
H A Dfreeze.rs6 alloc::AllocError,
72 fn new(flags: kernel::alloc::Flags) -> Result<UninitFM, AllocError> { in new() argument
322 fn find_freeze_recipients(&self) -> Result<KVVec<(DArc<Node>, Arc<Process>)>, AllocError> { in find_freeze_recipients() argument
360 AllocError in find_freeze_recipients()
370 pub(crate) fn prepare_freeze_messages(&self) -> Result<FreezeMessages, AllocError> { in prepare_freeze_messages() argument
H A Derror.rs63 impl From<kernel::alloc::AllocError> for BinderError {
64 fn from(_: kernel::alloc::AllocError) -> Self { in from()
H A Drust_binder_main.rs203 fn arc_try_new(val: T) -> Result<DLArc<T>, kernel::alloc::AllocError> { in arc_try_new() argument
211 .map_err(|_| kernel::alloc::AllocError) in arc_try_new()
H A Dallocation.rs273 Err(kernel::alloc::AllocError) => { in drop()
H A Dprocess.rs1506 Err(kernel::alloc::AllocError) => { in ioctl_freeze()
/linux/rust/pin-init/examples/
H A Dpthread_mutex.rs10 use core::alloc::AllocError;
57 impl From<AllocError> for Error {
58 fn from(_: AllocError) -> Self {
/linux/rust/kernel/list/
H A Darc.rs7 use crate::alloc::{AllocError, Flags};
174 pub fn new(contents: T, flags: Flags) -> Result<Self, AllocError> { in new()
186 E: From<AllocError>, in pin_init()
197 E: From<AllocError>, in init()
173 new(contents: T, flags: Flags) -> Result<Self, AllocError> new() argument
185 pin_init<E>(init: impl PinInit<T, E>, flags: Flags) -> Result<Self, E> where E: From<AllocError>, pin_init() argument
196 init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> where E: From<AllocError>, init() argument
/linux/rust/pin-init/
H A DREADME.md112 let foo: Result<Pin<Box<Foo>>, AllocError> = Box::pin_init(foo);