Struct biodivine_sketchbook::sketchbook::data_structs::_uninterpreted_fn_data::UninterpretedFnData
source · pub struct UninterpretedFnData {
pub id: String,
pub name: String,
pub annotation: String,
pub arguments: Vec<(Monotonicity, Essentiality)>,
pub expression: String,
}
Expand description
Structure for sending data about UninterpretedFn
to the frontend.
UninterpretedFnData
does not have the exact same fields as UninterpretedFn
(for instance, there
is an additional useful field id
). Some fields of UninterpretedFnData
are simplified to allow easier
(de)serialization and manipulation.
Fields§
§id: String
§name: String
§annotation: String
§arguments: Vec<(Monotonicity, Essentiality)>
§expression: String
Implementations§
source§impl UninterpretedFnData
impl UninterpretedFnData
sourcepub fn new(
id: &str,
name: &str,
annot: &str,
arguments: &[FnArgument],
expression: &str,
) -> UninterpretedFnData
pub fn new( id: &str, name: &str, annot: &str, arguments: &[FnArgument], expression: &str, ) -> UninterpretedFnData
Create new UninterpretedFnData
object given an uninterpreted fn’s name
, arity
, and id
.
sourcepub fn from_fn(
fn_id: &UninterpretedFnId,
uninterpreted_fn: &UninterpretedFn,
) -> UninterpretedFnData
pub fn from_fn( fn_id: &UninterpretedFnId, uninterpreted_fn: &UninterpretedFn, ) -> UninterpretedFnData
Create new UninterpretedFnData
object given an uninterpreted function and its id.
sourcepub fn to_uninterpreted_fn(
&self,
model: &ModelState,
) -> Result<UninterpretedFn, String>
pub fn to_uninterpreted_fn( &self, model: &ModelState, ) -> Result<UninterpretedFn, String>
Extract new UninterpretedFn
instance from this data (if the function’s expression
is valid).
Model is given for validity check during parsing the function’s expression.
Trait Implementations§
source§impl Clone for UninterpretedFnData
impl Clone for UninterpretedFnData
source§fn clone(&self) -> UninterpretedFnData
fn clone(&self) -> UninterpretedFnData
Returns a copy 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 UninterpretedFnData
impl Debug for UninterpretedFnData
source§impl<'de> Deserialize<'de> for UninterpretedFnData
impl<'de> Deserialize<'de> for UninterpretedFnData
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<'de> JsonSerde<'de> for UninterpretedFnData
impl<'de> JsonSerde<'de> for UninterpretedFnData
source§fn to_json_str(&self) -> String
fn to_json_str(&self) -> String
Wrapper for json serialization.
source§fn to_pretty_json_str(&self) -> String
fn to_pretty_json_str(&self) -> String
Wrapper for pretty json serialization with indentation.
source§impl PartialEq for UninterpretedFnData
impl PartialEq for UninterpretedFnData
source§impl Serialize for UninterpretedFnData
impl Serialize for UninterpretedFnData
impl StructuralPartialEq for UninterpretedFnData
Auto Trait Implementations§
impl Freeze for UninterpretedFnData
impl RefUnwindSafe for UninterpretedFnData
impl Send for UninterpretedFnData
impl Sync for UninterpretedFnData
impl Unpin for UninterpretedFnData
impl UnwindSafe for UninterpretedFnData
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)