Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
use flowy_error::ErrorCode;
#[derive(Debug)]
pub struct ViewThumbnail(pub String);
impl ViewThumbnail {
pub fn parse(s: String) -> Result<ViewThumbnail, ErrorCode> {
// if s.trim().is_empty() {
// return Err(format!("View thumbnail can not be empty or whitespace"));
// }
// TODO: verify the thumbnail url is valid or not
Ok(Self(s))
}
}
impl AsRef<str> for ViewThumbnail {
fn as_ref(&self) -> &str {
&self.0
}
}