pub struct MockPeerStores {
pub locations: InMemoryLocations,
pub sessions: InMemorySessions,
pub cdrs: InMemoryCdrs,
pub tariffs: InMemoryTariffs,
pub tokens: InMemoryTokens,
/* private fields */
}Available on crate features
server and testkit only.Expand description
The objects a MockPeer serves, reached through its Deref.
Seed and inspect them directly — peer.locations.put(location), peer.cdrs.len() — which is
what a test needs and what a handler trait cannot give you.
Fields§
§locations: InMemoryLocationsThe Locations this peer serves.
sessions: InMemorySessionsThe Sessions this peer serves.
cdrs: InMemoryCdrsThe CDRs this peer serves, and the ones a partner has POSTed to it.
tariffs: InMemoryTariffsThe Tariffs this peer serves.
tokens: InMemoryTokensThe Tokens this peer serves, and authorizes against.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MockPeerStores
impl RefUnwindSafe for MockPeerStores
impl Send for MockPeerStores
impl Sync for MockPeerStores
impl Unpin for MockPeerStores
impl UnsafeUnpin for MockPeerStores
impl UnwindSafe for MockPeerStores
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