pub enum Alignment {
Char,
Int2,
Int4,
Double,
}Expand description
Alignment specification for PostgreSQL user-defined base types.
Specifies the storage alignment requirement for values of the data type. The allowed values equate to alignment on 1, 2, 4, or 8 byte boundaries. Note that variable-length types must have an alignment of at least 4, since they necessarily contain an int4 as their first component.
§PostgreSQL Documentation
See: https://www.postgresql.org/docs/current/sql-createtype.html
§Examples
CREATE TYPE mytype (
INPUT = in_func,
OUTPUT = out_func,
ALIGNMENT = int4 -- 4-byte alignment
);Variants§
Char
Single-byte alignment: ALIGNMENT = char
Int2
2-byte alignment: ALIGNMENT = int2
Int4
4-byte alignment: ALIGNMENT = int4
Double
8-byte alignment: ALIGNMENT = double
Trait Implementations§
Source§impl Ord for Alignment
impl Ord for Alignment
Source§impl PartialOrd for Alignment
impl PartialOrd for Alignment
Source§impl VisitMut for Alignment
impl VisitMut for Alignment
Source§fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
Mutably visit this node with the provided
VisitorMut. Read moreimpl Copy for Alignment
impl Eq for Alignment
impl StructuralPartialEq for Alignment
Auto Trait Implementations§
impl Freeze for Alignment
impl RefUnwindSafe for Alignment
impl Send for Alignment
impl Sync for Alignment
impl Unpin for Alignment
impl UnsafeUnpin for Alignment
impl UnwindSafe for Alignment
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