pub struct XgBox {
pub upper_right_x: f64,
pub upper_right_y: f64,
pub lower_left_x: f64,
pub lower_left_y: f64,
}Expand description
§Xugu Geometric Box type
Description: Rectangular box
Representation: ((upper_right_x,upper_right_y),(lower_left_x,lower_left_y))
Boxes are represented by pairs of points that are opposite corners of the box. Values of type box are specified using any of the following syntaxes:
( ( upper_right_x , upper_right_y ) , ( lower_left_x , lower_left_y ) )
( upper_right_x , upper_right_y ) , ( lower_left_x , lower_left_y )
upper_right_x , upper_right_y , lower_left_x , lower_left_ywhere (upper_right_x,upper_right_y) and (lower_left_x,lower_left_y) are any two opposite corners of the box.
Any two opposite corners can be supplied on input, but the values will be reordered as needed to store the upper right and lower left corners, in that order.
Fields§
§upper_right_x: f64§upper_right_y: f64§lower_left_x: f64§lower_left_y: f64Implementations§
Source§impl XgBox
impl XgBox
pub fn from_bytes(bytes: &[u8]) -> Result<Self, BoxDynError>
Trait Implementations§
Source§impl<'r> Decode<'r, Xugu> for XgBox
impl<'r> Decode<'r, Xugu> for XgBox
Source§fn decode(value: XuguValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: XuguValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
Source§impl Encode<'_, Xugu> for XgBox
impl Encode<'_, Xugu> for XgBox
Source§fn encode_by_ref(
&self,
args: &mut Vec<XuguArgumentValue<'_>>,
) -> Result<IsNull, BoxDynError>
fn encode_by_ref( &self, args: &mut Vec<XuguArgumentValue<'_>>, ) -> Result<IsNull, BoxDynError>
fn produces(&self) -> Option<XuguTypeInfo>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
Writes the value of
self into buf in the expected format for the database.fn size_hint(&self) -> usize
Source§impl Type<Xugu> for XgBox
impl Type<Xugu> for XgBox
Source§fn type_info() -> XuguTypeInfo
fn type_info() -> XuguTypeInfo
Returns the canonical SQL type for this Rust type. Read more
Source§fn compatible(ty: &XuguTypeInfo) -> bool
fn compatible(ty: &XuguTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl StructuralPartialEq for XgBox
Auto Trait Implementations§
impl Freeze for XgBox
impl RefUnwindSafe for XgBox
impl Send for XgBox
impl Sync for XgBox
impl Unpin for XgBox
impl UnwindSafe for XgBox
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