openharmony_ci 30420ec062 !7 merge master into master
either新增bundle.json部件化

Created-by: dragonswordy
Commit-by: ljy9810
Merged-by: openharmony_ci
Description: ### 一、内容说明(相关的Issue)

https://gitcode.com/openharmony/third_party_rust_autocfg/issues/3

### 二、建议测试周期和提测地址  
  建议测试完成时间:xxxx.xx.xx  
  投产上线时间:xxxx.xx.xx  
  提测地址:CI环境/压测环境  
  测试账号:  

### 三、变更内容
  * 3.1 关联PR列表

  * 3.2 数据库和部署说明  
    1. 常规更新 
    2. 重启unicorn
    3. 重启sidekiq
    4. 迁移任务:是否有迁移任务,没有写 "无"
    5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无"

  * 3.4 其他技术优化内容(做了什么,变更了什么)
    - 重构了 xxxx 代码
    - xxxx 算法优化


  * 3.5 废弃通知(什么字段、方法弃用?)



  * 3.6  后向不兼容变更(是否有无法向后兼容的变更?)


  
### 四、研发自测点(自测哪些?冒烟用例全部自测?)
  自测测试结论:


### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方)
  检查点:

| 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 |
|------|------------|----------|---------------|
| xxx  | 否          | 需要       | 不需要           |
|      |            |          |               |

  接口测试:

  性能测试:

  并发测试:

  其他:



See merge request: openharmony/third_party_rust_either!7
2025-12-31 22:04:32 +08:00
2025-12-24 09:47:11 +08:00
2025-12-24 09:47:11 +08:00
2023-01-26 11:52:42 -08:00
2017-03-24 15:36:29 +01:00
2017-03-24 15:36:29 +01:00
2023-04-14 14:14:48 +08:00
2024-11-11 16:45:56 +08:00
2023-01-26 11:52:42 -08:00

Either
======

The enum ``Either`` with variants ``Left`` and ``Right`` and trait
implementations including Iterator, Read, Write.

Either has methods that are similar to Option and Result.

Includes convenience macros ``try_left!()`` and ``try_right!()`` to use for
short-circuiting logic.

Please read the `API documentation here`__

__ https://docs.rs/either/

|build_status|_ |crates|_

.. |build_status| image:: https://github.com/bluss/either/workflows/CI/badge.svg?branch=master
.. _build_status: https://github.com/bluss/either/actions

.. |crates| image:: https://img.shields.io/crates/v/either.svg
.. _crates: https://crates.io/crates/either

How to use with cargo::

    [dependencies]
    either = "1.8"


Recent Changes
--------------

- 1.8.1

  - Clarified that the multiple licenses are combined with OR.

- 1.8.0

  - **MSRV**: ``either`` now requires Rust 1.36 or later.

  - Add new methods ``.as_pin_ref()`` and ``.as_pin_mut()`` to project a
    pinned ``Either`` as inner ``Pin`` variants, by @cuviper (#77)

  - Implement the ``Future`` trait, by @cuviper (#77)

  - Specialize more methods of the ``io`` traits, by @Kixunil and @cuviper (#75)

- 1.7.0

  - **MSRV**: ``either`` now requires Rust 1.31 or later.

  - Export the macro ``for_both!``, by @thomaseizinger (#58)

  - Implement the ``io::Seek`` trait, by @Kerollmops (#60)

  - Add new method ``.either_into()`` for ``Into`` conversion, by @TonalidadeHidrica (#63)

  - Add new methods ``.factor_ok()``, ``.factor_err()``, and ``.factor_none()``,
    by @zachs18 (#67)

  - Specialize ``source`` in the ``Error`` implementation, by @thomaseizinger (#69)

  - Specialize more iterator methods and implement the ``FusedIterator`` trait,
    by @Ten0 (#66) and @cuviper (#71)

  - Specialize ``Clone::clone_from``, by @cuviper (#72)

- 1.6.1

  - Add new methods ``.expect_left()``, ``.unwrap_left()``,
    and equivalents on the right, by @spenserblack (#51)

- 1.6.0

  - Add new modules ``serde_untagged`` and ``serde_untagged_optional`` to customize
    how ``Either`` fields are serialized in other types, by @MikailBag (#49)

- 1.5.3

  - Add new method ``.map()`` for ``Either<T, T>`` by @nvzqz (#40).

- 1.5.2

  - Add new methods ``.left_or()``, ``.left_or_default()``, ``.left_or_else()``,
    and equivalents on the right, by @DCjanus (#36)

- 1.5.1

  - Add ``AsRef`` and ``AsMut`` implementations for common unsized types:
    ``str``, ``[T]``, ``CStr``, ``OsStr``, and ``Path``, by @mexus (#29)

- 1.5.0

  - Add new methods ``.factor_first()``, ``.factor_second()`` and ``.into_inner()``
    by @mathstuf (#19)

- 1.4.0

  - Add inherent method ``.into_iter()`` by @cuviper (#12)

- 1.3.0

  - Add opt-in serde support by @hcpl

- 1.2.0

  - Add method ``.either_with()`` by @Twey (#13)

- 1.1.0

  - Add methods ``left_and_then``, ``right_and_then`` by @rampantmonkey
  - Include license files in the repository and released crate

- 1.0.3

  - Add crate categories

- 1.0.2

  - Forward more ``Iterator`` methods
  - Implement ``Extend`` for ``Either<L, R>`` if ``L, R`` do.

- 1.0.1

  - Fix ``Iterator`` impl for ``Either`` to forward ``.fold()``.

- 1.0.0

  - Add default crate feature ``use_std`` so that you can opt out of linking to
    std.

- 0.1.7

  - Add methods ``.map_left()``, ``.map_right()`` and ``.either()``.
  - Add more documentation

- 0.1.3

  - Implement Display, Error

- 0.1.2

  - Add macros ``try_left!`` and ``try_right!``.

- 0.1.1

  - Implement Deref, DerefMut

- 0.1.0

  - Initial release
  - Support Iterator, Read, Write

License
-------

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0
https://www.apache.org/licenses/LICENSE-2.0 or the MIT license
https://opensource.org/licenses/MIT, at your
option. This file may not be copied, modified, or distributed
except according to those terms.
S
Description
提供一种简单、高效的处理选项类型的方法。 | A Rust library that provides a simple and efficient way to work with either/or types.
Readme 655 KiB
Languages
Rust 100%