pub enum Queue {
    Working,
    Deliver,
    Deferred,
    Dead,
}
Expand description

identifiers for all mail queues.

Variants

Working

Postq.

Deliver

1st attempt to deliver.

Deferred

1st delivery attempt failed.

Dead

Too many attempts failed.

Implementations

List the files contained in the queue

Errors
  • failed to initialize queue
  • error while reading directory
  • one entry produced an error

Write a MailContext to the self queue

Errors
  • the message’s metadata is ill-formed
  • failed to serialize the @ctx
  • failed to write on @ctx on queues_dirpath/self/ctx.id

Write a MessageBody to path provided

Errors
  • failed to open file
  • failed to serialize the mail
  • failed to write the mail on path
Errors
  • failed to create the folder in queues_dirpath

Return a message body from a file path. Try to parse the file as JSON, if it fails, try to parse it as plain text.

Errors
  • file(s) not found
  • file found but failed to read
  • file read but failed to serialize

Remove a message from the queue system.

Errors

Write the ctx to other AND THEN remove ctx from self

Errors

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more