pub struct Schema {
pub name: String,
pub description: String,
pub functions: Vec<Function>,
pub input_types: Typespace,
pub output_types: Typespace,
}
Fields§
§name: String
§description: String
§functions: Vec<Function>
§input_types: Typespace
§output_types: Typespace
Implementations§
source§impl Schema
impl Schema
pub fn new() -> Schema
pub fn name(&self) -> &str
pub fn description(&self) -> &str
pub fn functions(&self) -> Iter<'_, Function>
pub fn input_types(&self) -> &Typespace
pub fn is_input_type(&self, name: &str) -> bool
pub fn output_types(&self) -> &Typespace
pub fn is_output_type(&self, name: &str) -> bool
pub fn extend(&mut self, other: Schema)
pub fn prepend_path(&mut self, path: &str)
pub fn consolidate_types(&mut self) -> Vec<String>
pub fn get_type(&self, name: &str) -> Option<&Type>
pub fn glob_rename_types( &mut self, glob: &str, replacer: &str, ) -> Result<(), PatternError>
pub fn rename_types(&mut self, pattern: impl Pattern, replacer: &str) -> usize
pub fn fold_transparent_types(&mut self)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Schema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Schema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for Schema
impl Serialize for Schema
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl !Freeze for Schema
impl !RefUnwindSafe for Schema
impl Send for Schema
impl !Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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
)