pub struct FakePaginated<T> { /* private fields */ }Expand description
Builder for a fake PaginatedResponse<T>.
§Quick start
use api_bones_test::builders::FakePaginated;
let resp = FakePaginated::new(vec![1u32, 2, 3]).build();
assert_eq!(resp.items.len(), 3);
assert_eq!(resp.total_count, 3);
assert_eq!(resp.limit, 3);
assert_eq!(resp.offset, 0);
assert!(!resp.has_more);Implementations§
Source§impl<T> FakePaginated<T>
impl<T> FakePaginated<T>
Auto Trait Implementations§
impl<T> Freeze for FakePaginated<T>
impl<T> RefUnwindSafe for FakePaginated<T>where
T: RefUnwindSafe,
impl<T> Send for FakePaginated<T>where
T: Send,
impl<T> Sync for FakePaginated<T>where
T: Sync,
impl<T> Unpin for FakePaginated<T>where
T: Unpin,
impl<T> UnsafeUnpin for FakePaginated<T>
impl<T> UnwindSafe for FakePaginated<T>where
T: UnwindSafe,
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