/DragonOS/kernel/crates/intertrait/src/cast/ |
H A D | cast_ref.rs | 1 use core::any::TypeId; 66 let any = self.ref_any(); in cast() localVariable 68 let caster = caster::<T>(any.type_id())?; in cast() 69 (caster.cast_ref)(any).into() in cast()
|
H A D | cast_mut.rs | 37 let any = self.mut_any(); in cast() localVariable 38 let caster = caster::<T>((*any).type_id())?; in cast() 39 (caster.cast_mut)(any).into() in cast()
|
/DragonOS/kernel/crates/intertrait/macros/ |
H A D | LICENSE-APACHE | 30 "Object" form shall mean any form resulting from mechanical 40 "Derivative Works" shall mean any work, whether in Source or Object 48 "Contribution" shall mean any work of authorship, including 49 the original version of the Work and any modifications or additions 54 means any form of electronic, verbal, or written communication sent 62 "Contributor" shall mean Licensor and any individual or Legal Entity 82 institute patent litigation against any entity (including a 85 or contributory patent infringement, then any patent licenses 90 Work or Derivative Works thereof in any medium, with or without 94 (a) You must give any other recipients of the Work or [all …]
|
H A D | LICENSE-MIT | 1 Permission is hereby granted, free of charge, to any person obtaining a copy
|
/DragonOS/kernel/crates/rbpf/ |
H A D | LICENSE-APACHE | 31 "Object" form shall mean any form resulting from mechanical 41 "Derivative Works" shall mean any work, whether in Source or Object 49 "Contribution" shall mean any work of authorship, including 50 the original version of the Work and any modifications or additions 55 means any form of electronic, verbal, or written communication sent 63 "Contributor" shall mean Licensor and any individual or Legal Entity 83 institute patent litigation against any entity (including a 86 or contributory patent infringement, then any patent licenses 91 Work or Derivative Works thereof in any medium, with or without 95 (a) You must give any other recipients of the Work or [all …]
|
H A D | LICENSE-MIT | 3 Permission is hereby granted, free of charge, to any
|
/DragonOS/kernel/crates/intertrait/macros/src/ |
H A D | gen_caster.rs | 43 fn #fn_ident() -> (::std::any::TypeId, ::intertrait::BoxedCaster) { in generate_caster() 44 (::std::any::TypeId::of::<#ty>(), Box::new(#new_caster)) in generate_caster() 49 fn #fn_ident() -> (::core::any::TypeId, ::intertrait::BoxedCaster) { in generate_caster() 50 (::core::any::TypeId::of::<#ty>(), alloc::boxed::Box::new(#new_caster)) in generate_caster()
|
/DragonOS/ |
H A D | LICENSE | 16 Foundation's software and to any other program whose authors commit to 47 that any problems introduced by others will not reflect on the original 50 Finally, any free program is threatened constantly by software 53 program proprietary. To prevent this, we have made it clear that any 62 0. This License applies to any program or other work which contains 65 refers to any such program or work, and a "work based on the Program" 66 means either the Program or any derivative work under copyright law: 80 source code as you receive it, in any medium, provided that you 83 notices that refer to this License and to the absence of any warranty; 84 and give any other recipients of the Program a copy of this License [all …]
|
/DragonOS/kernel/src/arch/x86_64/ |
H A D | link.lds | 34 /* any files' .text */ 37 /* any files' .text.*, for example: rust .text._ZN* */
|
/DragonOS/kernel/src/arch/riscv64/ |
H A D | link.ld | 36 /* any files' .text */ 39 /* any files' .text.*, for example: rust .text._ZN* */
|
/DragonOS/kernel/src/net/socket/ |
H A D | unix.rs | 117 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref() 121 fn as_any_mut(&mut self) -> &mut dyn core::any::Any { in as_any_mut() 232 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref() 236 fn as_any_mut(&mut self) -> &mut dyn core::any::Any { in as_any_mut()
|
H A D | inet.rs | 230 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref() 234 fn as_any_mut(&mut self) -> &mut dyn core::any::Any { in as_any_mut() 477 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref() 481 fn as_any_mut(&mut self) -> &mut dyn core::any::Any { in as_any_mut() 578 let can_accept = self.handles.iter().any(|h| { in tcp_poll_listening() 1005 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref() 1009 fn as_any_mut(&mut self) -> &mut dyn core::any::Any { in as_any_mut()
|
/DragonOS/kernel/src/libs/ |
H A D | name.rs | 1 use core::any::type_name;
|
H A D | casting.rs | 19 use core::any::Any;
|
/DragonOS/kernel/crates/rbpf/examples/ |
H A D | rbpf_plugin.rs | 41 #[cfg(any(windows, not(feature = "std")))] in main() 99 #[cfg(any(windows, not(feature = "std")))] in main()
|
H A D | uptime.rs | 63 #[cfg(any(windows, not(feature = "std")))] in main()
|
/DragonOS/kernel/crates/intertrait/ |
H A D | README.md | 12 In Rust, a trait object for a sub-trait of [`std::any::Any`] can be downcast to a concrete type at … 16 With this crate, any trait object for a sub-trait of [`CastFrom`] can be cast directly to a trait o… 134 First of all, [`CastFrom`] trait makes it possible to retrieve an object of [`std::any::Any`] 138 for [`std::any::Any`] back to its concrete type and then creating a trait object for the target tra… 146 In the course, it doesn't rely on any unstable Rust implementation details such as the layout of tr…
|
H A D | Cargo.toml | 12 keywords = ["trait", "cast", "any"]
|
H A D | LICENSE-MIT | 1 Permission is hereby granted, free of charge, to any person obtaining a copy
|
/DragonOS/kernel/src/driver/pci/test/ |
H A D | pt_driver.rs | 94 if guard.devices.iter().any(|dev| Arc::ptr_eq(dev, &device)) { in add_device() 116 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
|
/DragonOS/kernel/src/virt/kvm/ |
H A D | mod.rs | 26 if vm_list.iter().any(|x| x.id == id) { in push_vm()
|
/DragonOS/kernel/src/driver/input/serio/i8042/ |
H A D | i8042_driver.rs | 113 if guard.devices.iter().any(|dev| Arc::ptr_eq(dev, &device)) { in add_device() 135 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
|
/DragonOS/kernel/src/driver/base/ |
H A D | subsys.rs | 169 if drivers.iter().any(|d| Arc::ptr_eq(d, driver)) { in add_driver_to_vec() 186 if devices.iter().any(|d| Arc::ptr_eq(d, device)) { in add_device_to_vec()
|
H A D | kobject.rs | 1 use core::{any::Any, fmt::Debug, hash::Hash, ops::Deref}; 27 fn as_any_ref(&self) -> &dyn core::any::Any; in as_any_ref()
|
/DragonOS/kernel/src/exception/ |
H A D | msi.rs | 1 use core::{any::Any, fmt::Debug};
|