Rust referenceloom-gateway
loom-gateway · routes::tree
Source declarations, signatures and documentation for routes::tree.
Source: sigil/weave/tools/loom-gateway/src/routes/tree.rs. SHA-256: a6215d8ef3d99d6834a622ecbb1ba92fd4e54cda83001579517822963105b7c7.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
routes::tree::TreeEntry
#[derive(Serialize)]
pub struct TreeEntry {
pub name: String,
pub kind: TreeKind,
pub path: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub blob: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub size: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub mode: Option<String>
}Source line: 12.
routes::tree::TreeKind
#[derive(Serialize)]
#[serde(rename_all = "lowercase")]
pub enum TreeKind {
Tree,
Blob,
}Source line: 26.
routes::tree::TreeEnvelope
#[derive(Serialize)]
pub struct TreeEnvelope {
pub repo: String,
pub rev: String,
pub path: String,
pub entries: Vec<TreeEntry>
}Source line: 32.
routes::tree::root
pub async fn root(
State(state): State<AppState>,
Path((name, rev)): Path<(String, String)>,
) -> Result<Json<TreeEnvelope>, ApiError>;Source line: 39.
routes::tree::nested
pub async fn nested(
State(state): State<AppState>,
Path((name, rev, path)): Path<(String, String, String)>,
) -> Result<Json<TreeEnvelope>, ApiError>;Source line: 46.