Merge pull request #68 from teloxide/pub_unpub

Fix field privacy
This commit is contained in:
Hirrolot 2021-03-19 15:44:28 +06:00 committed by GitHub
commit fbba515800
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 22 additions and 10 deletions

View file

@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [unreleased]
## [0.2.1] - 2020-03-19
### Fixed
- Types fields privacy (make fields of some types public) ([#68][pr68])
- `Dice::{emoji, value}`
- `MessageMessageAutoDeleteTimerChanged::message_auto_delete_timer_changed`
- `PassportElementError::{message, kind}`
- `StickerSet::thumb`
[pr68]: https://github.com/teloxide/teloxide-core/pull/68
## [0.2.0] - 2020-03-16
### Changed

View file

@ -1,7 +1,7 @@
[package]
name = "teloxide-core"
description = "Core part of the `teloxide` library - telegram bot API client"
version = "0.2.0"
version = "0.2.1"
edition = "2018"
authors = [
"Temirkhan Myrzamadi <hirrolot@gmail.com>",

View file

@ -15,7 +15,7 @@
<img src="https://img.shields.io/badge/license-MIT-blue.svg">
</a>
<a href="https://core.telegram.org/bots/api">
<img src="https://img.shields.io/badge/API%20coverage-Up%20to%200.5.1%20(inclusively)-green.svg">
<img src="https://img.shields.io/badge/API%20coverage-Up%20to%205.1%20(inclusively)-green.svg">
</a>
<a href="https://crates.io/crates/teloxide_core">
<img src="https://img.shields.io/crates/v/teloxide_core.svg">

View file

@ -1,11 +1,11 @@
//! Core part of the [`teloxide`] library.
//!
//! This library provides tools for making requests to the [Telegram Bot API]
//! (Currently, version `5.` is supported) with ease. The library is fully
//! (Currently, version `5.1` is supported) with ease. The library is fully
//! asynchronouns and built using [`tokio`].
//!
//!```toml
//! teloxide_core = "0.1"
//! teloxide_core = "0.2"
//! ```
//! _Compiler support: requires rustc 1.49+_
//!

View file

@ -7,7 +7,7 @@ use crate::types::DiceEmoji;
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Dice {
/// Emoji on which the dice throw animation is based.
emoji: DiceEmoji,
pub emoji: DiceEmoji,
/// Value of the dice.
///
@ -17,5 +17,5 @@ pub struct Dice {
/// [`DiceEmoji::Dice`]: crate::types::DiceEmoji::Dice
/// [`DiceEmoji::Darts`]:crate::types::DiceEmoji::Darts
/// [`DiceEmoji::Basketball`]:crate::types::DiceEmoji::Basketball
value: i32,
pub value: i32,
}

View file

@ -151,7 +151,7 @@ pub struct MessageChannelChatCreated {
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct MessageMessageAutoDeleteTimerChanged {
/// Service message: auto-delete timer settings changed in the chat.
message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged,
pub message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]

View file

@ -7,10 +7,10 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
pub struct PassportElementError {
/// Error message.
message: String,
pub message: String,
#[serde(flatten)]
kind: PassportElementErrorKind,
pub kind: PassportElementErrorKind,
}
impl PassportElementError {

View file

@ -25,5 +25,5 @@ pub struct StickerSet {
pub stickers: Vec<Sticker>,
/// Sticker set thumbnail in the .WEBP or .TGS format.
thumb: Option<PhotoSize>,
pub thumb: Option<PhotoSize>,
}