Home
last modified time | relevance | path

Searched refs:traits (Results 1 – 25 of 117) sorted by relevance

12345

/third_party/rust/crates/num-traits/
DRELEASES.md5 - [The new `LowerBounded` and `UpperBounded` traits][210] separately describe
6 types with lower and upper bounds. These traits are automatically implemented
20 [195]: https://github.com/rust-num/num-traits/pull/195
21 [196]: https://github.com/rust-num/num-traits/pull/196
22 [201]: https://github.com/rust-num/num-traits/pull/201
23 [202]: https://github.com/rust-num/num-traits/pull/202
24 [205]: https://github.com/rust-num/num-traits/pull/205
25 [207]: https://github.com/rust-num/num-traits/pull/207
26 [210]: https://github.com/rust-num/num-traits/pull/210
27 [214]: https://github.com/rust-num/num-traits/pull/214
[all …]
DREADME zh.md1 # num-traits
3 [![crate](https://img.shields.io/crates/v/num-traits.svg)](https://crates.io/crates/num-traits)
4 [![documentation](https://docs.rs/num-traits/badge.svg)](https://docs.rs/num-traits)
6 …tatus](https://github.com/rust-num/num-traits/workflows/master/badge.svg)](https://github.com/rust…
9 Num-traits在rust中提供了数字计算等数学方法的三方库,包括Rust中通用数学的数字特性。
13 在你的"BUILD.gn"中使用deps字段添加对num-traits crate的依赖,例如:
18 deps = [ "//third_party/rust/crates/num-traits:lib" ]
27 num-traits = "0.2"
36 [dependencies.num-traits]
43 `libm`特性仅在Rust 1.31及以后版本中可用([见PR #99](https://github.com/rust-num/num-traits/pull/99))。
[all …]
DREADME.md1 # num-traits
3 [![crate](https://img.shields.io/crates/v/num-traits.svg)](https://crates.io/crates/num-traits)
4 [![documentation](https://docs.rs/num-traits/badge.svg)](https://docs.rs/num-traits)
6 …tatus](https://github.com/rust-num/num-traits/workflows/master/badge.svg)](https://github.com/rust…
8 Numeric traits for generic mathematics in Rust.
16 num-traits = "0.2"
25 [dependencies.num-traits]
31 The `Float` and `Real` traits are only available when either `std` or `libm` is enabled.
32 … available with Rust 1.31 and later ([see PR #99](https://github.com/rust-num/num-traits/pull/99)).
48 The `num-traits` crate is tested for rustc 1.8 and greater.
DCargo.toml3 description = "Numeric traits for generic mathematics"
4 documentation = "https://docs.rs/num-traits"
5 homepage = "https://github.com/rust-num/num-traits"
9 repository = "https://github.com/rust-num/num-traits"
10 name = "num-traits"
DREADME.OpenSource3 "Name": "num-traits",
6 "Version Number": "num-traits-0.2.15",
8 "Upstream URL": "https://github.com/rust-num/num-traits",
9 …"Description": "A Rust library that provides support for numeric traits like zero, one, and orderi…
/third_party/flutter/txt/src/utils/
DTypeHelpers.h61 struct traits {
81 traits<T>::has_trivial_ctor && traits<U>::has_trivial_ctor,
83 traits<T>::has_trivial_dtor && traits<U>::has_trivial_dtor,
85 traits<T>::has_trivial_copy && traits<U>::has_trivial_copy,
87 traits<T>::has_trivial_move && traits<U>::has_trivial_move
164 if (!traits<TYPE>::has_trivial_ctor) {
174 if (!traits<TYPE>::has_trivial_dtor) {
184 typename std::enable_if<traits<TYPE>::has_trivial_copy>::type inline copy_type(
192 typename std::enable_if<!traits<TYPE>::has_trivial_copy>::type inline copy_type(
205 if (!traits<TYPE>::has_trivial_copy) {
[all …]
/third_party/flutter/engine/flutter/third_party/txt/src/utils/
DTypeHelpers.h61 struct traits {
81 traits<T>::has_trivial_ctor && traits<U>::has_trivial_ctor,
83 traits<T>::has_trivial_dtor && traits<U>::has_trivial_dtor,
85 traits<T>::has_trivial_copy && traits<U>::has_trivial_copy,
87 traits<T>::has_trivial_move && traits<U>::has_trivial_move
164 if (!traits<TYPE>::has_trivial_ctor) {
174 if (!traits<TYPE>::has_trivial_dtor) {
184 typename std::enable_if<traits<TYPE>::has_trivial_copy>::type inline copy_type(
192 typename std::enable_if<!traits<TYPE>::has_trivial_copy>::type inline copy_type(
205 if (!traits<TYPE>::has_trivial_copy) {
[all …]
/third_party/gn/src/base/strings/
Dstring_number_conversions.cc134 typedef IteratorRangeToNumberTraits traits; typedef in base::__anon27366c2a0111::IteratorRangeToNumber
135 typedef typename traits::iterator_type const_iterator;
136 typedef typename traits::value_type value_type;
180 typename traits::value_type* output) { in Invoke()
189 if (traits::kBase == 16 && end - begin > 2 && *begin == '0' && in Invoke()
197 if (!CharToDigit<traits::kBase>(*current, &new_digit)) { in Invoke()
205 *output *= traits::kBase; in Invoke()
217 if (*output > static_cast<value_type>(traits::max() / traits::kBase) || in CheckBounds()
218 (*output == static_cast<value_type>(traits::max() / traits::kBase) && in CheckBounds()
219 new_digit > traits::max() % traits::kBase)) { in CheckBounds()
[all …]
/third_party/vk-gl-cts/framework/opengl/
DgluObjectWrapper.cpp36 ObjectWrapper::ObjectWrapper (const glw::Functions& gl, const ObjectTraits& traits) in ObjectWrapper() argument
38 , m_traits (traits) in ObjectWrapper()
41 (gl.*traits.genFunc)(1, &m_object); in ObjectWrapper()
46 const char* objectName = traits.name; in ObjectWrapper()
58 ObjectWrapper::ObjectWrapper (const glw::Functions& gl, const ObjectTraits& traits, deUint32 object) in ObjectWrapper() argument
60 , m_traits (traits) in ObjectWrapper()
88 ObjectVector::ObjectVector (const glw::Functions& gl, const ObjectTraits& traits, size_t numObjects) in ObjectVector() argument
90 , m_traits (traits) in ObjectVector()
DgluObjectWrapper.hpp67 ObjectWrapper (const glw::Functions& gl, const ObjectTraits& traits);
68 ObjectWrapper (const glw::Functions& gl, const ObjectTraits& traits, deUint32 object);
101 … ObjectVector (const glw::Functions& gl, const ObjectTraits& traits, size_t numObjects = 0);
/third_party/rust/crates/cxx/macro/src/
Dderive.rs9 let mut traits = Vec::new(); in expand_struct() localVariable
18 Trait::Eq => traits.push(quote_spanned!(span=> ::cxx::core::cmp::Eq)), in expand_struct()
20 Trait::Hash => traits.push(quote_spanned!(span=> ::cxx::core::hash::Hash)), in expand_struct()
22 Trait::PartialEq => traits.push(quote_spanned!(span=> ::cxx::core::cmp::PartialEq)), in expand_struct()
24 Trait::Serialize => traits.push(quote_spanned!(span=> ::serde::Serialize)), in expand_struct()
25 Trait::Deserialize => traits.push(quote_spanned!(span=> ::serde::Deserialize)), in expand_struct()
29 if traits.is_empty() { in expand_struct()
32 *actual_derives = Some(quote!(#[derive(#(#traits),*)])); in expand_struct()
40 let mut traits = Vec::new(); in expand_enum() localVariable
60 traits.push(quote_spanned!(span=> ::cxx::core::cmp::Eq)); in expand_enum()
[all …]
/third_party/rust/crates/io-lifetimes/
DCargo.toml16 # dependencies to add foreign-type impls for the traits. In the future,
20 # Optionally depend on fs_err to implement traits for its types for now.
24 # Optionally depend on os_pipe to implement traits for its types for now.
28 # third-party traits. This is only done in not(io_safety_is_in_std) mode,
29 # because when we're using the std types and traits, we can't define impls
30 # on third-party traits, due to the orphan rule. Work is ongoing to add
39 # Optionally depend on tokio to implement traits for its types.
41 # Optionally depend on socket2 to implement traits for its types.
43 # Optionally depend on mio to implement traits for its types.
DREADME.md16 traits, and corresponding features for Windows, which implement safe owning
44 main traits:
98 io-lifetimes will use and re-export the standard-library types and traits. With
99 older versions, io-lifetimes defines its own copy of these types and traits.
102 including the portability traits `AsFilelike`/`AsSocketlike`/etc., the
103 `from_into_*` functions in the `From*` traits, and [views].
128 traits which leverage Rust's lifetime system and allow safe and checked
163 its own `As*`/`Into*`/`From*` traits, rather than extending
/third_party/cef/include/internal/
Dcef_string_wrappers.h345 template <class traits>
348 typedef typename traits::char_type char_type;
349 typedef typename traits::struct_type struct_type;
350 typedef typename traits::userfree_struct_type userfree_struct_type;
474 return traits::compare(string_, str.GetStruct()); in compare()
482 traits::clear(string_); in clear()
564 traits::userfree_free(str); in AttachToUserFree()
586 userfree_struct_type str = traits::userfree_alloc(); in DetachToUserFree()
608 return traits::set(src, src_len, string_, copy) ? true : false; in FromString()
623 return traits::from_ascii(str, len, string_); in FromASCII()
[all …]
/third_party/rust/crates/syn/codegen/src/
Dgen.rs27 let mut traits = TokenStream::new(); in traverse() localVariable
34 traits.extend(features.clone()); in traverse()
36 node(&mut traits, &mut impls, &s, defs); in traverse()
39 (traits, impls) in traverse()
Dvisit.rs119 fn node(traits: &mut TokenStream, impls: &mut TokenStream, s: &Node, defs: &Definitions) { in node()
214 traits.extend(quote! { in node()
231 let (traits, impls) = gen::traverse(defs, node); in generate()
259 #traits in generate()
/third_party/rust/crates/io-lifetimes/src/
Dlib.rs37 mod traits; module
46 pub use traits::AsFd;
49 pub use traits::{AsHandle, AsSocket};
52 pub use traits::{FromFd, IntoFd};
55 pub use traits::{FromHandle, FromSocket, IntoHandle, IntoSocket};
/third_party/rust/crates/nom/src/bytes/
Dstreaming.rs8 use crate::traits::{
532 + crate::traits::Offset in escaped()
538 <Input as InputIter>::Item: crate::traits::AsChar, in escaped()
543 use crate::traits::AsChar; in escaped()
634 + crate::traits::Offset in escaped_transform()
640 Input: crate::traits::ExtendInto<Item = ExtendItem, Extender = Output>, in escaped_transform()
641 O1: crate::traits::ExtendInto<Item = ExtendItem, Extender = Output>, in escaped_transform()
642 O2: crate::traits::ExtendInto<Item = ExtendItem, Extender = Output>, in escaped_transform()
643 <Input as InputIter>::Item: crate::traits::AsChar, in escaped_transform()
648 use crate::traits::AsChar; in escaped_transform()
Dcomplete.rs8 use crate::traits::{
516 + crate::traits::Offset in escaped()
522 <Input as InputIter>::Item: crate::traits::AsChar, in escaped()
527 use crate::traits::AsChar; in escaped()
630 + crate::traits::Offset in escaped_transform()
636 Input: crate::traits::ExtendInto<Item = ExtendItem, Extender = Output>, in escaped_transform()
637 O1: crate::traits::ExtendInto<Item = ExtendItem, Extender = Output>, in escaped_transform()
638 O2: crate::traits::ExtendInto<Item = ExtendItem, Extender = Output>, in escaped_transform()
639 <Input as InputIter>::Item: crate::traits::AsChar, in escaped_transform()
644 use crate::traits::AsChar; in escaped_transform()
/third_party/flutter/engine/flutter/fml/
Dmessage.h25 #define FML_SERIALIZE_TRAITS(message, value, traits) \ argument
26 if (!message.Encode<traits>(value)) { \
35 #define FML_DESERIALIZE_TRAITS(message, value, traits) \ argument
36 if (!message.Decode<traits>(value)) { \
/third_party/skia/third_party/externals/abseil-cpp/absl/random/internal/
DBUILD.gn7 absl_source_set("traits") {
8 public = [ "traits.h" ]
53 ":traits",
102 ":traits",
116 ":traits",
265 ":traits",
DBUILD.bazel36 name = "traits",
37 hdrs = ["traits.h"],
111 ":traits",
183 ":traits",
205 ":traits",
400 ":traits",
676 ":traits",
/third_party/rust/crates/nom/doc/
Dcustom_input_types.md4 use any type as input, as long as they follow a specific set of traits.
5 Those traits were developed first to abstract away the differences between
22 Here are the traits we have to implement for `MyInput`:
39 Here are the traits we have to implement for `MyItem`:
/third_party/json/include/nlohmann/detail/meta/
Dtype_traits.hpp209 using traits = iterator_traits<T>; typedef
213 is_detected<value_type_t, traits>::value &&
214 is_detected<difference_type_t, traits>::value &&
215 is_detected<pointer_t, traits>::value &&
216 is_detected<iterator_category_t, traits>::value &&
217 is_detected<reference_t, traits>::value;
/third_party/skia/third_party/externals/tint/src/
Dclone_context.h64 using ParamTypeIsPtrOf = traits::IsTypeOrDerived<
65 typename std::remove_pointer<traits::ParameterType<F, 0>>::type,
275 traits::EnableIf<ParamTypeIsPtrOf<F, Cloneable>::value, CloneContext>&
277 using TPtr = traits::ParameterType<F, 0>; in ReplaceAll()
333 typename = traits::EnableIfIsType<WITH, Cloneable>>

12345