Skip to main content

TreeSection

Struct TreeSection 

Source
pub struct TreeSection {
    pub max_depth: Option<u32>,
    pub max_children: Option<u32>,
    pub creates_per_hour: Option<u32>,
    pub reserved_labels: Option<Vec<String>>,
}
Expand description

The shape one creator may give the ownership tree, enforced by the server whatever policy says.

Reload: hot for the three bounds below. A running server re-reads this file every [intervals] tree_reload_secs and judges every later create by what it found; a create already judged keeps its answer. A re-read that fails — the file gone, the TOML bad, a bound outside its range — changes nothing and warns, naming the file and the key.

reserved_labels is read once, into the router, and needs a restart.

Fields§

§max_depth: Option<u32>

The deepest an account may sit, in edges from the operator.

Reasonable range: 1 to 64. This bounds how long a chain a reader walks to reach the operator, and how many parties it rests on. Ten, the default, leaves room above a service, a host beneath it and an agent beneath that for agents that register agents of their own.

§max_children: Option<u32>

The most accounts one creator may operate at once.

Reasonable range: 1 to 1_000_000. This bounds how many accounts one leaked key can be holding when the operator notices. Ten thousand, the default, is above the pools this deployment expects and under what a loop reaches.

§creates_per_hour: Option<u32>

The most accounts one creator may create in an hour.

Reasonable range: 1 to 1_000_000. This bounds the rate rather than the total, and is what stops a loop before max_children is reached. A hundred, the default, admits a pool of a hundred coming up at once.

§reserved_labels: Option<Vec<String>>

Labels no account may take directly under a zone: the hostnames the deployment answers at itself, and names a browser or resolver asks for on its own. Absent, didbot_serve::tree::RESERVED_LABELS stands; an empty list reserves nothing.

Reasonable range: 0 to 100 labels. Each one is a name the deployment’s own www, xrpc or dashboard would otherwise share with an agent through the zone’s wildcard.

Trait Implementations§

Source§

impl Clone for TreeSection

Source§

fn clone(&self) -> TreeSection

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TreeSection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TreeSection

Source§

fn default() -> TreeSection

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for TreeSection

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TreeSection

Source§

fn eq(&self, other: &TreeSection) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for TreeSection

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for TreeSection

Source§

impl StructuralPartialEq for TreeSection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,