pub struct Node {
pub root: bool,
pub de_type: Option<TokenStream>,
pub children: HashSet<String>,
pub endpoint: Option<TokenStream>,
}
Expand description
Nodes are the segments of the key in "key": EndpointType
in a Dict Entry
e.g., “path/to/endpoint”: MyType,
path: Path <- root
|_ to: To <- child of path
|_ endpoint: Endpoint <- leaf & child of to
impl Endpoint {
async fn get() -> Result<MyType> { ... }
}
The struct build of this would result in:
SomeApiName.path.to.endpoint.get()
note 1: endpoint
, being a leaf node, gets access to the get()
function.
note 2: each struct will have a new()
impl.
Fields§
§root: bool
§de_type: Option<TokenStream>
§children: HashSet<String>
§endpoint: Option<TokenStream>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl !Send for Node
impl !Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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