pub struct RestrictionInfo {
pub restriction_reason: String,
pub has_sensitive_content: bool,
}Expand description
Contains information about restrictions that must be applied to a chat or a message
Fields§
§restriction_reason: StringA human-readable description of the reason why access to the content must be restricted. If empty, then the content can be accessed, but may be covered by hidden with 18+ spoiler anyway
has_sensitive_content: boolTrue, if media content of the messages must be hidden with 18+ spoiler. Use value of the option “can_ignore_sensitive_content_restrictions” to check whether the current user can ignore the restriction. If age verification parameters were received in updateAgeVerificationParameters, then the user must complete age verification to ignore the restriction. Set the option “ignore_sensitive_content_restrictions” to true if the user passes age verification
Trait Implementations§
Source§impl Clone for RestrictionInfo
impl Clone for RestrictionInfo
Source§fn clone(&self) -> RestrictionInfo
fn clone(&self) -> RestrictionInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RestrictionInfo
impl Debug for RestrictionInfo
Source§impl Default for RestrictionInfo
impl Default for RestrictionInfo
Source§fn default() -> RestrictionInfo
fn default() -> RestrictionInfo
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RestrictionInfo
impl<'de> Deserialize<'de> for RestrictionInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RestrictionInfo
impl PartialEq for RestrictionInfo
Source§impl Serialize for RestrictionInfo
impl Serialize for RestrictionInfo
impl StructuralPartialEq for RestrictionInfo
Auto Trait Implementations§
impl Freeze for RestrictionInfo
impl RefUnwindSafe for RestrictionInfo
impl Send for RestrictionInfo
impl Sync for RestrictionInfo
impl Unpin for RestrictionInfo
impl UnsafeUnpin for RestrictionInfo
impl UnwindSafe for RestrictionInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more