Home
last modified time | relevance | path

Searched refs:AllocError (Results 1 – 18 of 18) 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), argument
645 AllocErrorKind::AllocError(kernel::alloc::AllocError) => ENOMEM, in from()
[all …]
H A Dbitmap.rs9 use crate::alloc::{AllocError, Flags};
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()
529 fn bitmap_vec_new() -> Result<(), AllocError> { in bitmap_vec_new()
546 fn bitmap_set_clear_find() -> Result<(), AllocError> { in bitmap_set_clear_find()
576 fn owned_bitmap_out_of_bounds() -> Result<(), AllocError> { in owned_bitmap_out_of_bounds()
604 fn bitmap_copy_and_extend() -> Result<(), AllocError> { in bitmap_copy_and_extend()
H A Dstr.rs6 alloc::{flags::*, AllocError, KVec},
231 fn to_cstring(&self) -> Result<CString, AllocError>; in to_cstring() argument
264 fn to_ascii_lowercase(&self) -> Result<CString, AllocError>; in to_ascii_lowercase() argument
275 fn to_ascii_uppercase(&self) -> Result<CString, AllocError>; in to_ascii_uppercase() argument
341 fn to_cstring(&self) -> Result<CString, AllocError> { in to_cstring() argument
355 fn to_ascii_lowercase(&self) -> Result<CString, AllocError> { in to_ascii_lowercase() argument
363 fn to_ascii_uppercase(&self) -> Result<CString, AllocError> { in to_ascii_uppercase() argument
868 type Error = AllocError;
870 fn try_from(cstr: &'a CStr) -> Result<CString, AllocError> { in try_from() argument
H A Dinit.rs129 alloc::{AllocError, Flags},
148 E: From<AllocError>; in try_pin_init() argument
168 E: From<AllocError>; in 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
184 fn alloc(layout: Layout, flags: Flags, nid: NumaNode) -> Result<NonNull<[u8]>, AllocError> { in alloc() argument
236 ) -> Result<NonNull<[u8]>, AllocError>; in realloc() argument
H A Derror.rs10 alloc::{layout::LayoutError, AllocError},
218 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.rs16 use crate::alloc::{AllocError, Allocator, NumaNode};
91 ) -> Result<NonNull<[u8]>, AllocError> { in call() argument
120 NonNull::new(raw_ptr).ok_or(AllocError)? in call()
152 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
222 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
243 ) -> Result<NonNull<[u8]>, AllocError> { in realloc() argument
H A Dkvec.rs8 AllocError, Allocator, Box, Flags, NumaNode,
325 pub fn push(&mut self, v: T, flags: Flags) -> Result<(), AllocError> { in push() argument
501 pub fn with_capacity(capacity: usize, flags: Flags) -> Result<Self, AllocError> { in with_capacity() argument
622 pub fn reserve(&mut self, additional: usize, flags: Flags) -> Result<(), AllocError> { in reserve() argument
632 return Err(AllocError); in reserve()
637 let new_cap = core::cmp::max(cap * 2, len.checked_add(additional).ok_or(AllocError)?); in reserve()
638 let layout = ArrayLayout::new(new_cap).map_err(|_| AllocError)?; in reserve()
740 pub fn extend_with(&mut self, n: usize, value: T, flags: Flags) -> Result<(), AllocError> { in extend_with() argument
779 pub fn extend_from_slice(&mut self, other: &[T], flags: Flags) -> Result<(), AllocError> { in extend_from_slice() argument
795 pub fn from_elem(value: T, n: usize, flags: Flags) -> Result<Self, AllocError> { in from_elem() argument
[all …]
H A Dkbox.rs7 use super::{AllocError, Allocator, Flags, NumaNode};
256 pub fn new(x: T, flags: Flags) -> Result<Self, AllocError> { in new() argument
275 pub fn new_uninit(flags: Flags) -> Result<Box<MaybeUninit<T>, A>, AllocError> { in new_uninit() argument
287 pub fn pin(x: T, flags: Flags) -> Result<Pin<Box<T, A>>, AllocError> in pin()
344 E: From<AllocError>, in pin_slice() argument
467 E: From<AllocError>, in try_pin_init() argument
475 E: From<AllocError>, in 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.rs71 impl From<kernel::alloc::AllocError> for BinderError {
72 fn from(_: kernel::alloc::AllocError) -> Self { in from()
H A Drust_binder_main.rs194 fn arc_try_new(val: T) -> Result<DLArc<T>, kernel::alloc::AllocError> { in arc_try_new() argument
202 .map_err(|_| kernel::alloc::AllocError) in arc_try_new()
H A Dprocess.rs1492 Err(kernel::alloc::AllocError) => { in ioctl_freeze()
/linux/rust/pin-init/examples/
H A Dpthread_mutex.rs11 use core::alloc::AllocError;
58 impl From<AllocError> for Error {
59 fn from(_: AllocError) -> Self { in from()
/linux/rust/kernel/list/
H A Darc.rs7 use crate::alloc::{AllocError, Flags};
173 pub fn new(contents: T, flags: Flags) -> Result<Self, AllocError> { in new() argument
185 E: From<AllocError>, in pin_init() argument
196 E: From<AllocError>, in init() argument
/linux/rust/pin-init/
H A DREADME.md112 let foo: Result<Pin<Box<Foo>>, AllocError> = Box::pin_init(foo);