pub struct ContentMetadata {Show 14 fields
pub id: Uuid,
pub cid: ContentCid,
pub title: String,
pub description: String,
pub category: ContentCategory,
pub tags: Vec<String>,
pub size_bytes: Bytes,
pub chunk_count: u64,
pub price: Points,
pub creator_id: Uuid,
pub status: ContentStatus,
pub preview_images: Vec<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Content metadata.
Fields§
§id: Uuid§cid: ContentCid§title: String§description: String§category: ContentCategory§size_bytes: Bytes§chunk_count: u64§price: Points§creator_id: Uuid§status: ContentStatus§preview_images: Vec<String>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl ContentMetadata
impl ContentMetadata
Sourcepub fn expected_chunk_count(&self) -> u64
pub fn expected_chunk_count(&self) -> u64
Calculate expected chunk count from size.
Sourcepub fn is_processing(&self) -> bool
pub fn is_processing(&self) -> bool
Check if the content is being processed.
Check if the content has been removed or rejected.
Trait Implementations§
Source§impl Clone for ContentMetadata
impl Clone for ContentMetadata
Source§fn clone(&self) -> ContentMetadata
fn clone(&self) -> ContentMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContentMetadata
impl Debug for ContentMetadata
Source§impl<'de> Deserialize<'de> for ContentMetadata
impl<'de> Deserialize<'de> for ContentMetadata
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 From<&ContentMetadata> for CreateContentInput
impl From<&ContentMetadata> for CreateContentInput
Source§fn from(metadata: &ContentMetadata) -> Self
fn from(metadata: &ContentMetadata) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ContentMetadata
impl RefUnwindSafe for ContentMetadata
impl Send for ContentMetadata
impl Sync for ContentMetadata
impl Unpin for ContentMetadata
impl UnwindSafe for ContentMetadata
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