pub trait QBAttachable {
// Required methods
fn can_upload(&self) -> Result<(), QBTypeError>;
fn file_path(&self) -> Option<&Path>;
}Expand description
Trait for all entities that can be attached as files/notes.
Preconditions for upload:
file_nameornotemust be present;file_pathmust be present.content_typemust be present.can_upload()returns an error if required fields are missing.
Required Methods§
Sourcefn can_upload(&self) -> Result<(), QBTypeError>
fn can_upload(&self) -> Result<(), QBTypeError>
Returns Ok(()) when the instance has the fields required for upload.