pub struct SessionConfig {
pub max_surb_upstream: Option<String>,
pub response_buffer: Option<String>,
}Expand description
SessionConfig
JSON schema
{
"examples": [
{
"maxSurbUpstream": "2 Mbps",
"responseBuffer": "2 MB"
}
],
"type": "object",
"properties": {
"maxSurbUpstream": {
"description": "The maximum throughput at which artificial SURBs might be generated and sent\nto the recipient of the Session.\n\nOn Sessions that rarely send data but receive a lot (= Exit node has high SURB consumption),\nthis should roughly match the maximum retrieval throughput.\n\nAll syntaxes like \"2 MBps\", \"1.2Mbps\", \"300 kb/s\", \"1.23 Mb/s\" are supported.",
"type": "string"
},
"responseBuffer": {
"description": "The amount of response data the Session counterparty can deliver back to us,\nwithout us sending any SURBs to them.\n\nIn other words, this size is recalculated to a number of SURBs delivered\nto the counterparty upfront and then maintained.\nThe maintenance is dynamic, based on the number of responses we receive.\n\nAll syntaxes like \"2 MB\", \"128 kiB\", \"3MiB\" are supported. The value must be\nat least the size of 2 Session packet payloads.",
"type": "string"
}
}
}Fields§
§max_surb_upstream: Option<String>The maximum throughput at which artificial SURBs might be generated and sent to the recipient of the Session.
On Sessions that rarely send data but receive a lot (= Exit node has high SURB consumption), this should roughly match the maximum retrieval throughput.
All syntaxes like “2 MBps”, “1.2Mbps”, “300 kb/s”, “1.23 Mb/s” are supported.
response_buffer: Option<String>The amount of response data the Session counterparty can deliver back to us, without us sending any SURBs to them.
In other words, this size is recalculated to a number of SURBs delivered to the counterparty upfront and then maintained. The maintenance is dynamic, based on the number of responses we receive.
All syntaxes like “2 MB”, “128 kiB”, “3MiB” are supported. The value must be at least the size of 2 Session packet payloads.
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§fn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionConfig
impl Debug for SessionConfig
Source§impl Default for SessionConfig
impl Default for SessionConfig
Source§impl<'de> Deserialize<'de> for SessionConfig
impl<'de> Deserialize<'de> for SessionConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnwindSafe for SessionConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more