5 releases
0.0.4 | Sep 20, 2024 |
---|---|
0.0.3 | Sep 17, 2024 |
0.0.2 | Sep 17, 2024 |
0.0.1 | Sep 13, 2024 |
0.0.0 | Sep 10, 2024 |
#701 in Rust patterns
715 downloads per month
Used in 2 crates
105KB
3K
SLoC
base-traits
base traits, for Rust
Introduction
This crate defines general-purpose trait
s that:
- seem obvious and yet are missing from the standard library (e.g.
IsEmpty
,Len
); or - provide a basis to introduce specific functionality to allow for other crates to interoperate;
Table of Contents
Installation
T.B.C.
Components
Enumerations
None defined at this time.
Functions
None defined at this time.
Macros
None defined at this time.
Structures
None defined at this time.
Traits
The following traits are defined:
AsF64
- provides (non-mutating) instance method#as_f64() : f64
;AsStr
- provides (non-mutating) instance method#as_str() : &str
;AsUSize
- provides (non-mutating) instance method#as_usize() : usize
;Infinity
- provides method::infinity() : Self
;IsEmpty
- provides (non-mutating) instance method#is_empty() : bool
;IsInfinity
- provides (non-mutating) instance method#is_infinity() : bool
;IsNAN
- provides (non-mutating) instance method#is_nan() : bool
;IsZero
- provides (non-mutating) instance method#is_zero() : bool
;Len
- provides (non-mutating) instance method#len() : usize
;ToF64
- provides (non-mutating) instance method#to_f64() : f64
;ToUSize
- provides (non-mutating) instance method#to_usize() : usize
;Zero
- provides class method::zero() : Self
;
Examples
T.B.C.
Project Information
T.B.C.
Where to get help
Contribution guidelines
Defect reports, feature requests, and pull requests are welcome on https://github.com/synesissoftware/base-traits.
Dependencies
There are no dependencies on other crates.
Related projects
License
base-traits is released under the 3-clause BSD license. See LICENSE for details.
No runtime deps
Features
- experimental-exact_size_is_empty
- implement-AsF64-for-built_ins
- implement-AsStr-for-built_ins
- implement-AsStr-for-standard_collection_types
- implement-AsUSize-for-built_ins
- implement-Infinity-for-built_ins
- implement-IsEmpty-for-built_ins
- implement-IsEmpty-for-standard_collection_types
- implement-IsEmpty-for-standard_ffi_types
- implement-IsEmpty-for-standard_path_types
- implement-IsEmpty-for-standard_process_types
- implement-IsEmpty-for-standard_range_types
- implement-IsEmpty-for-standard_time_types
- implement-IsInfinity-for-built_ins
- implement-IsNAN-for-built_ins
- implement-IsZero-for-built_ins
- implement-IsZero-for-standard_num_types
- implement-IsZero-for-standard_process_types
- implement-IsZero-for-standard_time_types
- implement-Len-for-built_ins
- implement-Len-for-standard_collection_types
- implement-Len-for-standard_ffi_types
- implement-Len-for-standard_path_types
- implement-Len-for-standard_process_types
- implement-ToF64-for-built_ins
- implement-ToUSize-for-built_ins
- implement-Zero-for-built_ins