pub enum PreConfiguredDestination<'a> {
Plain {
app_name: &'a str,
aspects: &'a [&'a str],
},
Single {
app_name: &'a str,
aspects: &'a [&'a str],
identity: Zeroizing<[u8; 64]>,
announce_app_data: &'a [u8],
proof: ProofStrategy,
link_requests: LinkRequestPolicy,
ratchet: RatchetPolicy,
resource_strategy: ResourceStrategy,
maximum_request_bytes: ByteLimit,
request_endpoints: ServeMyRequestEndpoints,
},
}Variants§
Plain
Single
Fields
§
proof: ProofStrategy§
link_requests: LinkRequestPolicy§
ratchet: RatchetPolicy§
resource_strategy: ResourceStrategyWhether links to this destination accept inbound resources, and how large. The runtime counterpart is the handle’s set_resource_strategy; most destinations want ResourceStrategy::AcceptNone until they expect a transfer.
§
request_endpoints: ServeMyRequestEndpointsImplementations§
Source§impl PreConfiguredDestination<'_>
impl PreConfiguredDestination<'_>
Sourcepub fn destination_hash(&self) -> Result<DestinationHash, ExpandNameError>
pub fn destination_hash(&self) -> Result<DestinationHash, ExpandNameError>
The address this destination answers as, derived from its name (and key, for a Single), so an announcing app can name itself before the node starts. Err only when the name is malformed (a dotted component, or past the length bound), the same validation PrnsNode::new runs as it stands the destination up.
Auto Trait Implementations§
impl<'a> Freeze for PreConfiguredDestination<'a>
impl<'a> RefUnwindSafe for PreConfiguredDestination<'a>
impl<'a> Send for PreConfiguredDestination<'a>
impl<'a> Sync for PreConfiguredDestination<'a>
impl<'a> Unpin for PreConfiguredDestination<'a>
impl<'a> UnsafeUnpin for PreConfiguredDestination<'a>
impl<'a> UnwindSafe for PreConfiguredDestination<'a>
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