Home
last modified time | relevance | path

Searched refs:try_new (Results 1 – 7 of 7) sorted by relevance

/linux/drivers/android/binder/range_alloc/
H A Dmod.rs319 self.args.empty_array_alloc = Some(EmptyArrayAlloc::try_new(TREE_THRESHOLD)?); in make_alloc()
322 self.args.new_tree_alloc = Some(FromArrayAllocs::try_new(TREE_THRESHOLD)?); in make_alloc()
325 self.args.tree_alloc = Some(ReserveNewTreeAlloc::try_new()?); in make_alloc()
H A Dtree.rs437 pub(crate) fn try_new() -> Result<Self> { in try_new() method
473 pub(crate) fn try_new(len: usize) -> Result<Self> { in try_new() method
H A Darray.rs276 pub(crate) fn try_new(capacity: usize) -> Result<Self> { in try_new() method
/linux/rust/kernel/num/
H A Dbounded.rs80 /// Values can also be validated at runtime with [`Bounded::try_new`].
86 /// assert!(Bounded::<u8, 4>::try_new(15).is_some());
89 /// assert!(Bounded::<u8, 4>::try_new(16).is_none());
306 /// let v = Bounded::<u8, 1>::try_new(1);
309 /// let v = Bounded::<i8, 4>::try_new(-2);
313 /// let v = Bounded::<u32, 8>::try_new(0x1ff);
318 /// let v = Bounded::<i8, 4>::try_new(-8);
320 /// let v = Bounded::<i8, 4>::try_new(-9);
322 /// let v = Bounded::<i8, 4>::try_new(7);
324 /// let v = Bounded::<i8, 4>::try_new(
331 pub fn try_new(value: T) -> Option<Self> { try_new() function
[all...]
/linux/rust/kernel/
H A Di2c.rs573 Devres::new(parent_dev, Self::try_new(i2c_adapter, i2c_board_info)) in try_new()
576 fn try_new(i2c_adapter: &I2cAdapter, i2c_board_info: &I2cBoardInfo) -> Result<Self> { in try_new()
568 fn try_new(i2c_adapter: &I2cAdapter, i2c_board_info: &I2cBoardInfo) -> Result<Self> { try_new() method
H A Ddma.rs126 /// Use [`DmaMask::new`] or [`DmaMask::try_new`] to construct a value. Values
158 let Ok(mask) = Self::try_new(N) else { in new()
175 /// let mask0 = DmaMask::try_new(0)?;
178 /// let mask1 = DmaMask::try_new(1)?;
181 /// let mask64 = DmaMask::try_new(64)?;
184 /// let mask_overflow = DmaMask::try_new(100);
189 pub const fn try_new(n: u32) -> Result<Self> { in try_new() method
/linux/drivers/android/binder/
H A Dthread.rs293 reply_work: ThreadError::try_new()?, in new()
294 return_work: ThreadError::try_new()?, in new()
1611 fn try_new() -> Result<DArc<Self>> { in try_new() method