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 ViewIdentify(pub String);
impl ViewIdentify {
pub fn parse(s: String) -> Result<ViewIdentify, ErrorCode> {
if s.trim().is_empty() {
return Err(ErrorCode::ViewIdIsInvalid);
}
Ok(Self(s))
}
}
impl AsRef<str> for ViewIdentify {
fn as_ref(&self) -> &str {
&self.0
}
}