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

Download history 150/week @ 2024-09-06 454/week @ 2024-09-13 222/week @ 2024-09-20 21/week @ 2024-09-27 4/week @ 2024-10-04

715 downloads per month
Used in 2 crates

BSD-3-Clause

105KB
3K SLoC

base-traits

base traits, for Rust

Introduction

This crate defines general-purpose traits 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

GitHub Page

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.

License

base-traits is released under the 3-clause BSD license. See LICENSE for details.

No runtime deps

Features