pub struct QueueInfo {
pub name: String,
pub queue_type: QueueType,
}Expand description
Information about a Service Bus queue including name and type.
Represents a queue with its full name and type classification. Provides utility methods for working with main queues and their corresponding dead letter queues.
§Examples
use quetty_server::service_bus_manager::{QueueInfo, QueueType};
// Create a main queue
let main_queue = QueueInfo::main_queue("orders".to_string());
assert_eq!(main_queue.name, "orders");
assert_eq!(main_queue.queue_type, QueueType::Main);
// Get the corresponding dead letter queue
let dlq = main_queue.to_dlq();
assert_eq!(dlq.name, "orders/$deadletterqueue");
assert_eq!(dlq.queue_type, QueueType::DeadLetter);Fields§
§name: StringFull name of the queue
queue_type: QueueTypeType classification of the queue
Implementations§
Source§impl QueueInfo
impl QueueInfo
Sourcepub fn main_queue(name: String) -> Self
pub fn main_queue(name: String) -> Self
Sourcepub fn dead_letter_queue(base_name: String) -> Self
pub fn dead_letter_queue(base_name: String) -> Self
Sourcepub fn base_name(&self) -> String
pub fn base_name(&self) -> String
Gets the base name of the queue without any type-specific suffixes.
For main queues, returns the name as-is. For dead letter queues,
removes the /$deadletterqueue suffix to get the base name.
§Returns
The base queue name without type suffixes
Trait Implementations§
impl Eq for QueueInfo
impl StructuralPartialEq for QueueInfo
Auto Trait Implementations§
impl Freeze for QueueInfo
impl RefUnwindSafe for QueueInfo
impl Send for QueueInfo
impl Sync for QueueInfo
impl Unpin for QueueInfo
impl UnwindSafe for QueueInfo
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.