pub struct ResourceCollection<T>where
T: JsonResource,{
pub data: Vec<T>,
}Expand description
Struktur untuk menangani koleksi data (list).
Fields§
§data: Vec<T>Implementations§
Source§impl<T> ResourceCollection<T>where
T: JsonResource,
impl<T> ResourceCollection<T>where
T: JsonResource,
pub fn new(data: Vec<T>) -> ResourceCollection<T>
Trait Implementations§
Source§impl<T> IntoResponse for ResourceCollection<T>where
T: JsonResource,
impl<T> IntoResponse for ResourceCollection<T>where
T: JsonResource,
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Auto Trait Implementations§
impl<T> Forget for ResourceCollection<T>
impl<T> Freeze for ResourceCollection<T>
impl<T> Move for ResourceCollection<T>
impl<T> RefUnwindSafe for ResourceCollection<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for ResourceCollection<T>
impl<T> Sync for ResourceCollection<T>
impl<T> Unpin for ResourceCollection<T>
impl<T> UnsafeUnpin for ResourceCollection<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for ResourceCollection<T>where
Vec<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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more