#[non_exhaustive]pub enum ServerEvent {
#[non_exhaustive] BadClaims {
digest: Checksum,
san: Option<String>,
reason: String,
},
#[non_exhaustive] InvalidCollectionDir {
name: String,
},
#[non_exhaustive] StaleSummary {
item: String,
},
}Expand description
An event of a server, which
ServeOptions::on_event receives.
Display writes one line for the log of the host. It
writes each control character of a text from the client as an escape
sequence, for example \n, so the line holds no line break.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]BadClaims
The server refused a request because the claims of its client certificate do not parse.
For a session request, the selected client group has
tls-accept-claim=true. For a read, a group with
tls-accept-claim=true carries the item of the certificate. The
request got 403.
Fields
This variant is marked as non-exhaustive
digest: ChecksumThe SHA-256 digest of the DER bytes of the certificate, as a
tls-sha256:HEX item names it.
#[non_exhaustive]InvalidCollectionDir
A ref listing left out a directory under refs/mirrors/ whose name
fails the collection-id rule
(ostrya::is_collection_id).
The server reports each name one time for each Server
value, at the first listing that finds it. Only a listing whose query
holds a collection pair reads the directories under
refs/mirrors/. The listing itself goes on. The server reports the
event also with no receive policies.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]StaleSummary
The server answered summary or summary.sig with 404, because the
.access file of the auth item of the client does not hold the
access digest of the item
(ArchiveAnswer::StaleSummary).
The summary of the item does not match the client groups that the
server read at start. ostrya summary -u writes the summaries again.
The server reports each item one time for each
Server value, at the first request that finds it.
Implementations§
Source§impl ServerEvent
impl ServerEvent
Sourcepub fn is_warning(&self) -> bool
pub fn is_warning(&self) -> bool
Returns true if the event is a warning: the server served the
request. Each other event is an error of a request that the server
refused.
InvalidCollectionDir is a
warning. BadClaims and
StaleSummary are errors.
Trait Implementations§
Source§impl Clone for ServerEvent
impl Clone for ServerEvent
Source§impl Debug for ServerEvent
impl Debug for ServerEvent
Source§impl Display for ServerEvent
impl Display for ServerEvent
impl Eq for ServerEvent
Source§impl PartialEq for ServerEvent
impl PartialEq for ServerEvent
impl StructuralPartialEq for ServerEvent
Auto Trait Implementations§
impl Forget for ServerEvent
impl Freeze for ServerEvent
impl Move for ServerEvent
impl RefUnwindSafe for ServerEvent
impl Send for ServerEvent
impl Sync for ServerEvent
impl Unpin for ServerEvent
impl UnsafeUnpin for ServerEvent
impl UnwindSafe for ServerEvent
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.