pub struct Production { /* private fields */ }Expand description
A persistent container for production state.
Implementations§
Source§impl Production
impl Production
Sourcepub fn new(
id: ProductionId,
schema_version: u32,
created_at: Timestamp,
display_name: Option<String>,
) -> Self
pub fn new( id: ProductionId, schema_version: u32, created_at: Timestamp, display_name: Option<String>, ) -> Self
Creates an in-memory production value.
Sourcepub const fn id(&self) -> ProductionId
pub const fn id(&self) -> ProductionId
Returns the production’s stable identity.
Sourcepub const fn schema_version(&self) -> u32
pub const fn schema_version(&self) -> u32
Returns the persistence schema version used to load this production.
Sourcepub const fn created_at(&self) -> Timestamp
pub const fn created_at(&self) -> Timestamp
Returns when the production was created.
Sourcepub fn display_name(&self) -> Option<&str>
pub fn display_name(&self) -> Option<&str>
Returns the optional user-facing name.
Sourcepub fn media_roots(&self) -> &[MediaRoot]
pub fn media_roots(&self) -> &[MediaRoot]
Returns configured media roots in resolver priority order.
Sourcepub fn set_media_roots(&mut self, roots: Vec<MediaRoot>)
pub fn set_media_roots(&mut self, roots: Vec<MediaRoot>)
Replaces media roots after sorting by priority and stable identity.
Trait Implementations§
Source§impl Clone for Production
impl Clone for Production
Source§fn clone(&self) -> Production
fn clone(&self) -> Production
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Production
impl Debug for Production
impl Eq for Production
Source§impl PartialEq for Production
impl PartialEq for Production
Source§fn eq(&self, other: &Production) -> bool
fn eq(&self, other: &Production) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Production
Auto Trait Implementations§
impl Freeze for Production
impl RefUnwindSafe for Production
impl Send for Production
impl Sync for Production
impl Unpin for Production
impl UnsafeUnpin for Production
impl UnwindSafe for Production
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