Skip to main content

validate_branch_name

Function validate_branch_name 

Source
pub fn validate_branch_name(name: &str) -> Result<(), Error>
Expand description

Is this a name a branch can durably have?

Same discipline as a collection name (refuse, never sanitise — a silently rewritten name is a different branch than the one the caller asked for), plus one extra rule: a purely numeric name is refused, because every operator surface that takes a branch also takes a sequence number, and nedb branch 1234 must not be ambiguous about which one it means.