pub struct ShapeContract {
pub rank: Option<usize>,
pub axis_sizes: BTreeMap<String, AxisSizeContract>,
pub allow_ragged: bool,
}Fields§
§rank: Option<usize>§axis_sizes: BTreeMap<String, AxisSizeContract>§allow_ragged: boolImplementations§
Source§impl ShapeContract
impl ShapeContract
pub fn validate(&self) -> Result<()>
pub fn validate_representation( &self, source_id: &SourceId, representation: &RepresentationSpec, ) -> Result<()>
Trait Implementations§
Source§impl Clone for ShapeContract
impl Clone for ShapeContract
Source§fn clone(&self) -> ShapeContract
fn clone(&self) -> ShapeContract
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 ShapeContract
impl Debug for ShapeContract
Source§impl Default for ShapeContract
impl Default for ShapeContract
Source§fn default() -> ShapeContract
fn default() -> ShapeContract
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ShapeContract
impl<'de> Deserialize<'de> for ShapeContract
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
impl Eq for ShapeContract
Source§impl PartialEq for ShapeContract
impl PartialEq for ShapeContract
Source§fn eq(&self, other: &ShapeContract) -> bool
fn eq(&self, other: &ShapeContract) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ShapeContract
impl Serialize for ShapeContract
impl StructuralPartialEq for ShapeContract
Auto Trait Implementations§
impl Freeze for ShapeContract
impl RefUnwindSafe for ShapeContract
impl Send for ShapeContract
impl Sync for ShapeContract
impl Unpin for ShapeContract
impl UnsafeUnpin for ShapeContract
impl UnwindSafe for ShapeContract
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