Struct fiberplane_models::notebooks::ImageCell
source · #[non_exhaustive]pub struct ImageCell {
pub id: String,
pub file_id: Option<String>,
pub progress: Option<f64>,
pub read_only: Option<bool>,
pub width: Option<i32>,
pub height: Option<i32>,
pub preview: Option<String>,
pub url: Option<String>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: String§file_id: Option<String>§progress: Option<f64>Used to indicates the upload progress. If file_id is set this shouldn’t be set Also: if no progress is set and no file_id exists it means the cell is in the initial state (ready for upload)
read_only: Option<bool>§width: Option<i32>§height: Option<i32>§preview: Option<String>Will contain a hash to show as a preview for the image
url: Option<String>URL of the image if it was originally hosted on a remote server. This will not be set if the image was uploaded through the Fiberplane Studio.
Implementations§
source§impl ImageCell
impl ImageCell
sourcepub fn builder() -> ImageCellBuilder<((), (), (), (), (), (), (), ())>
pub fn builder() -> ImageCellBuilder<((), (), (), (), (), (), (), ())>
Create a builder for building ImageCell.
On the builder, call .id(...)(optional), .file_id(...)(optional), .progress(...)(optional), .read_only(...)(optional), .width(...)(optional), .height(...)(optional), .preview(...)(optional), .url(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of ImageCell.
Trait Implementations§
source§impl<'de> Deserialize<'de> for ImageCell
impl<'de> Deserialize<'de> for ImageCell
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 ImageCell
impl PartialEq for ImageCell
impl StructuralPartialEq for ImageCell
Auto Trait Implementations§
impl Freeze for ImageCell
impl RefUnwindSafe for ImageCell
impl Send for ImageCell
impl Sync for ImageCell
impl Unpin for ImageCell
impl UnwindSafe for ImageCell
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