base-traits 0.0.4

base traits (for Rust)
Documentation

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.

Related projects

License

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