pub struct SlackFile { /* private fields */ }Expand description
Slack file object representation.
§Fields and Validations
For more details, see the official documentation.
| Field | Type | Required | Validation |
|---|---|---|---|
| id | String | Conditionally | N/A |
| url | String | Conditionally | N/A |
§Validation Across Fields
- Exactly one of the fields
idorurlmust be provided.
§Example
use slack_messaging::composition_objects::SlackFile;
let file = SlackFile::builder()
.id("F0123456")
.build()?;
let expected = serde_json::json!({
"id": "F0123456"
});
let json = serde_json::to_value(file).unwrap();
assert_eq!(json, expected);
// If your object has any validation errors, the build method returns Result::Err
let file = SlackFile::builder().build();
assert!(file.is_err());Implementations§
Source§impl SlackFile
impl SlackFile
Sourcepub fn builder() -> SlackFileBuilder
pub fn builder() -> SlackFileBuilder
constract SlackFileBuilder object.
Trait Implementations§
impl StructuralPartialEq for SlackFile
Auto Trait Implementations§
impl Freeze for SlackFile
impl RefUnwindSafe for SlackFile
impl Send for SlackFile
impl Sync for SlackFile
impl Unpin for SlackFile
impl UnwindSafe for SlackFile
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)