pub struct NodeType {
pub name: String,
/* private fields */
}Expand description
Schema definition for a node type
Fields§
§name: StringImplementations§
Source§impl NodeType
impl NodeType
pub fn new(name: impl Into<String>) -> Self
pub fn id<V: FieldValidator + 'static>(self, validator: V) -> Self
pub fn field<V: FieldValidator + 'static>( self, name: impl Into<String>, validator: V, ) -> Self
pub fn validate_node(&self, node: &Node) -> ValidationResult
Auto Trait Implementations§
impl !RefUnwindSafe for NodeType
impl !UnwindSafe for NodeType
impl Freeze for NodeType
impl Send for NodeType
impl Sync for NodeType
impl Unpin for NodeType
impl UnsafeUnpin for NodeType
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