pub struct MediaHandler {
pub aggregate: QualifiedIdentifier,
pub table: Option<QualifiedIdentifier>,
pub base_type: String,
}Expand description
A user-defined renderer for a media type.
PostgREST lets a schema override how a media type is produced by declaring
an aggregate whose state type is a domain named after that media type –
create domain "application/geo+json" as jsonb and an aggregate over the
table’s rows returning it. The aggregate is then applied to the rows the
request selected and its result is the whole response body.
Fields§
§aggregate: QualifiedIdentifierThe aggregate to apply.
table: Option<QualifiedIdentifier>The table it renders, or None when it takes anyelement and so
renders any of them.
base_type: StringThe type the handler’s media-type domain is a domain over, which is what says whether its output is bytes or text.
Trait Implementations§
Source§impl Clone for MediaHandler
impl Clone for MediaHandler
Source§fn clone(&self) -> MediaHandler
fn clone(&self) -> MediaHandler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MediaHandler
impl RefUnwindSafe for MediaHandler
impl Send for MediaHandler
impl Sync for MediaHandler
impl Unpin for MediaHandler
impl UnsafeUnpin for MediaHandler
impl UnwindSafe for MediaHandler
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<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