pub struct ModelSnapshot {
pub schemas: Vec<SchemaSnapshot>,
}Expand description
Serializable model snapshot shape used by future migration history artifacts.
Fields§
§schemas: Vec<SchemaSnapshot>Implementations§
Source§impl ModelSnapshot
impl ModelSnapshot
pub fn new(schemas: Vec<SchemaSnapshot>) -> Self
pub fn from_entities(entities: &[&'static EntityMetadata]) -> Self
pub fn schema(&self, name: &str) -> Option<&SchemaSnapshot>
pub fn to_json_pretty(&self) -> Result<String, OrmError>
pub fn from_json(json: &str) -> Result<Self, OrmError>
Trait Implementations§
Source§impl Clone for ModelSnapshot
impl Clone for ModelSnapshot
Source§fn clone(&self) -> ModelSnapshot
fn clone(&self) -> ModelSnapshot
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 ModelSnapshot
impl Debug for ModelSnapshot
Source§impl Default for ModelSnapshot
impl Default for ModelSnapshot
Source§fn default() -> ModelSnapshot
fn default() -> ModelSnapshot
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelSnapshot
impl<'de> Deserialize<'de> for ModelSnapshot
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 PartialEq for ModelSnapshot
impl PartialEq for ModelSnapshot
Source§fn eq(&self, other: &ModelSnapshot) -> bool
fn eq(&self, other: &ModelSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ModelSnapshot
impl Serialize for ModelSnapshot
impl Eq for ModelSnapshot
impl StructuralPartialEq for ModelSnapshot
Auto Trait Implementations§
impl Freeze for ModelSnapshot
impl RefUnwindSafe for ModelSnapshot
impl Send for ModelSnapshot
impl Sync for ModelSnapshot
impl Unpin for ModelSnapshot
impl UnsafeUnpin for ModelSnapshot
impl UnwindSafe for ModelSnapshot
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