pub struct DeathNote { /* private fields */ }Expand description
The armed death note. Constructed by DeathNote::arm early in the
server run loop; its Drop writes the DISARMED line, so any ordinary
exit from the run scope — clean shutdown, error return, or a panic
unwinding through it — closes the bracket on the record.
Implementations§
Source§impl DeathNote
impl DeathNote
Sourcepub fn arm(home: &Path) -> Result<Self, ServerError>
pub fn arm(home: &Path) -> Result<Self, ServerError>
Arm the death note under the resolved Aion home: create
<home>/logs/, open the note file append-only, write the ARMED
line, install the panic hook, and start the signal watcher.
§Errors
Returns ServerError::DeathNote when a note is already armed in
this process, when the logs directory or note file cannot be created,
or when the signal watcher cannot be installed. Arming failures are
fatal to boot by design: a server that cannot record its own death is
exactly the server this module exists for.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DeathNote
impl !UnwindSafe for DeathNote
impl Freeze for DeathNote
impl Send for DeathNote
impl Sync for DeathNote
impl Unpin for DeathNote
impl UnsafeUnpin for DeathNote
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request