Home
last modified time | relevance | path

Searched refs:Lazy (Results 1 – 25 of 56) sorted by relevance

123

/third_party/rust/crates/once_cell/src/
Dlib.rs684 pub struct Lazy<T, F = fn() -> T> { struct
689 impl<T, F: RefUnwindSafe> RefUnwindSafe for Lazy<T, F> where OnceCell<T>: RefUnwindSafe {} implementation
691 impl<T: fmt::Debug, F> fmt::Debug for Lazy<T, F> { implementation
697 impl<T, F> Lazy<T, F> { impl
712 pub const fn new(init: F) -> Lazy<T, F> { in new()
713 Lazy { cell: OnceCell::new(), init: Cell::new(Some(init)) } in new()
719 pub fn into_value(this: Lazy<T, F>) -> Result<T, F> { in into_value()
728 impl<T, F: FnOnce() -> T> Lazy<T, F> { implementation
743 pub fn force(this: &Lazy<T, F>) -> &T { in force()
764 pub fn force_mut(this: &mut Lazy<T, F>) -> &mut T { in force_mut()
[all …]
/third_party/rust/crates/lazy-static.rs/src/
Dinline_lazy.rs19 pub struct Lazy<T: Sync>(Cell<Option<T>>, Once); struct
21 impl<T: Sync> Lazy<T> { implementation
23 pub const INIT: Self = Lazy(Cell::new(None), ONCE_INIT);
49 unsafe impl<T: Sync> Sync for Lazy<T> {} implementation
55 static $NAME: $crate::lazy::Lazy<$T> = $crate::lazy::Lazy::INIT;
Dcore_lazy.rs12 pub struct Lazy<T: Sync>(Once<T>); struct
14 impl<T: Sync> Lazy<T> { impl
15 pub const INIT: Self = Lazy(Once::INIT);
29 static $NAME: $crate::lazy::Lazy<$T> = $crate::lazy::Lazy::INIT;
/third_party/rust/crates/once_cell/tests/
Dit.rs7 use once_cell::unsync::{Lazy, OnceCell};
105 let x = Lazy::new(|| { in lazy_new()
124 let mut x = Lazy::new(|| { in lazy_deref_mut()
143 let mut x = Lazy::new(|| { in lazy_force_mut()
148 let v = Lazy::force_mut(&mut x); in lazy_force_mut()
159 let mut x: Lazy<u32, _> = Lazy::new(|| { in lazy_get_mut()
167 let mut_ref: &mut u32 = Lazy::get_mut(&mut x).unwrap(); in lazy_get_mut()
187 let lazy: Lazy<std::sync::Mutex<Foo>> = <_>::default(); in lazy_default()
202 let l: Lazy<i32, _> = Lazy::new(|| panic!()); in lazy_into_value()
203 assert!(matches!(Lazy::into_value(l), Err(_))); in lazy_into_value()
[all …]
/third_party/rust/crates/once_cell/
DCHANGELOG.md24 - Add extension to `unsync` and `sync` `Lazy` mut API:
36 - Add `Lazy::get`, similar to `OnceCell::get`.
82 - Add `Lazy::into_value`
117 - remove unnecessary `F: fmt::Debug` bound from `impl fmt::Debug for Lazy<T, F>`.
121 - `Lazy<T>` now implements `DerefMut`.
130 - implement `Default` for `Lazy`: it creates an empty `Lazy<T>` which is initialized with `T::defau…
139 - fix unsoundness in `Lazy<T>` if the initializing function panics. Thanks [@xfix](https://github.c…
140 - implement `RefUnwindSafe` for `Lazy`.
149 - fix wrong `Sync` bound on `sync::Lazy`.
161 - Updated `Lazy`'s `Deref` impl to requires only `FnOnce` instead of `Fn`
[all …]
DREADME.md26 `once_cell` also has a `Lazy<T>` type, build on top of `OnceCell` which provides the same API as
31 use once_cell::sync::Lazy;
33 static GLOBAL_DATA: Lazy<Mutex<HashMap<i32, String>>> = Lazy::new(|| {
/third_party/rust/crates/once_cell/examples/
Dlazy_static.rs3 use once_cell::sync::{Lazy, OnceCell};
6 static HASHMAP: Lazy<HashMap<u32, &'static str>> = Lazy::new(|| {
Dbench_vs_lazy_static.rs2 use once_cell::sync::Lazy;
7 static ONCE_CELL: Lazy<Vec<String>> = Lazy::new(|| vec!["Spica".to_string(), "Hoyten".to_string()]);
/third_party/typescript/tests/baselines/reference/
DgenericTypeAliases.types39 type Lazy<T> = T | (() => T);
40 >Lazy : Lazy<T>
42 var ls: Lazy<string>;
43 >ls : Lazy<string>
47 >ls : Lazy<string>
52 >ls : Lazy<string>
DgenericTypeAliases.symbols39 type Lazy<T> = T | (() => T);
40 >Lazy : Symbol(Lazy, Decl(genericTypeAliases.ts, 11, 2))
45 var ls: Lazy<string>;
47 >Lazy : Symbol(Lazy, Decl(genericTypeAliases.ts, 11, 2))
DgenericTypeAliases.js15 type Lazy<T> = T | (() => T);
17 var ls: Lazy<string>;
/third_party/rust/crates/clap/clap_derive/src/
Ditem.rs563 …ULT_VALUE: clap::__macro_refs::once_cell::sync::Lazy<String> = clap::__macro_refs::once_cell::sync… in push_attrs()
572 …ULT_VALUE: clap::__macro_refs::once_cell::sync::Lazy<String> = clap::__macro_refs::once_cell::sync… in push_attrs()
631 … clap::__macro_refs::once_cell::sync::Lazy<Vec<::std::string::String>> = clap::__macro_refs::once_… in push_attrs()
635 …T_VALUES: clap::__macro_refs::once_cell::sync::Lazy<Vec<&str>> = clap::__macro_refs::once_cell::sy… in push_attrs()
651 … clap::__macro_refs::once_cell::sync::Lazy<Vec<::std::string::String>> = clap::__macro_refs::once_… in push_attrs()
655 …T_VALUES: clap::__macro_refs::once_cell::sync::Lazy<Vec<&str>> = clap::__macro_refs::once_cell::sy… in push_attrs()
695 …UE: clap::__macro_refs::once_cell::sync::Lazy<::std::ffi::OsString> = clap::__macro_refs::once_cel… in push_attrs()
704 …UE: clap::__macro_refs::once_cell::sync::Lazy<::std::ffi::OsString> = clap::__macro_refs::once_cel… in push_attrs()
763 …: clap::__macro_refs::once_cell::sync::Lazy<Vec<::std::ffi::OsString>> = clap::__macro_refs::once_… in push_attrs()
767 …S: clap::__macro_refs::once_cell::sync::Lazy<Vec<&::std::ffi::OsStr>> = clap::__macro_refs::once_c… in push_attrs()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DDomTreeUpdater.cpp60 if (Strategy != UpdateStrategy::Lazy || !DT) in applyDomTreeUpdates()
81 if (Strategy != UpdateStrategy::Lazy || !PDT) in applyPostDomTreeUpdates()
180 if (Strategy == UpdateStrategy::Lazy) { in deleteBB()
193 if (Strategy == UpdateStrategy::Lazy) { in callbackDeleteBB()
235 if (Strategy == UpdateStrategy::Lazy) { in applyUpdates()
294 if (Strategy == UpdateStrategy::Lazy) in applyUpdatesPermissive()
/third_party/typescript/tests/cases/conformance/types/typeAliases/
DgenericTypeAliases.ts14 type Lazy<T> = T | (() => T); alias
16 var ls: Lazy<string>;
/third_party/rust/crates/cxx/gen/build/src/
Dcfg.rs347 use once_cell::sync::Lazy;
381 static CURRENT: Lazy<RwLock<CurrentCfg>> = Lazy::new(|| RwLock::new(CurrentCfg::default()));
/third_party/rust/crates/which-rs/src/
Dfinder.rs156 use once_cell::sync::Lazy; in append_extension()
162 static PATH_EXTENSIONS: Lazy<Vec<String>> = Lazy::new(|| { in append_extension()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Analysis/
DDomTreeUpdater.h28 enum class UpdateStrategy : unsigned char { Eager = 0, Lazy = 1 }; enumerator
49 bool isLazy() const { return Strategy == UpdateStrategy::Lazy; }; in isLazy()
/third_party/node/deps/npm/node_modules/negotiator/
DHISTORY.md4 * Revert "Lazy-load modules from main entry point"
25 * Lazy-load modules from main entry point
/third_party/protobuf/csharp/src/Google.Protobuf/Reflection/
DFileDescriptor.cs81 private readonly Lazy<Dictionary<IDescriptor, DescriptorDeclaration>> declarations;
108 …declarations = new Lazy<Dictionary<IDescriptor, DescriptorDeclaration>>(CreateDeclarationMap, Lazy… in FileDescriptor()
/third_party/node/deps/v8/src/builtins/
Dic.tq11 maybeTarget: JSAny, maybeReceiver: Lazy<JSAny>, context: Context,
/third_party/node/deps/v8/src/codegen/
Dsource-position-table.h63 inline bool Lazy() const { return mode_ == LAZY_SOURCE_POSITIONS; } in Lazy() function
/third_party/rust/crates/clap/src/
Dmacros.rs51 static CACHED: clap::__macro_refs::once_cell::sync::Lazy<String> =
52 clap::__macro_refs::once_cell::sync::Lazy::new(|| authors.replace(':', $sep));
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/DebugInfo/DWARF/
DDWARFUnit.cpp50 bool Lazy) { in addUnitsForDWOSection() argument
55 D.getLineDWOSection(), C.isLittleEndian(), true, Lazy, in addUnitsForDWOSection()
64 bool Lazy, DWARFSectionKind SectionKind) { in addUnitsImpl() argument
96 if (Lazy) in addUnitsImpl()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/DebugInfo/DWARF/
DDWARFUnit.h141 DWARFSectionKind SectionKind, bool Lazy = false);
165 bool IsDWO, bool Lazy, DWARFSectionKind SectionKind);
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/LTO/
DThinLTOCodeGenerator.cpp184 bool Lazy, in loadModuleFromInput() argument
189 Lazy ? Mod.getLazyModule(Context, in loadModuleFromInput()
200 if (!Lazy) in loadModuleFromInput()

123