Struct css_style::position::Position [−][src]
pub struct Position { pub position: Option<PositionType>, pub left: Option<PostionLength>, pub top: Option<PostionLength>, pub right: Option<PostionLength>, pub bottom: Option<PostionLength>, pub z_index: Option<i32>, pub clip: Option<Clip>, }
use css_style::{Style, unit::px}; Style::default() .and_position(|conf| { conf.absolute().top(px(28)).left(px(40)) });
Fields
position: Option<PositionType>
left: Option<PostionLength>
top: Option<PostionLength>
right: Option<PostionLength>
bottom: Option<PostionLength>
z_index: Option<i32>
clip: Option<Clip>
Implementations
impl Position
[src]
pub fn position(self, value: impl Into<PositionType>) -> Self
[src]
pub fn try_position(self, value: Option<impl Into<PositionType>>) -> Self
[src]
pub fn static_(self) -> Self
[src]
pub fn absolute(self) -> Self
[src]
pub fn fixed(self) -> Self
[src]
pub fn relative(self) -> Self
[src]
pub fn sticky(self) -> Self
[src]
pub fn initial(self) -> Self
[src]
pub fn inherit(self) -> Self
[src]
pub fn left(self, value: impl Into<PostionLength>) -> Self
[src]
pub fn try_left(self, value: Option<impl Into<PostionLength>>) -> Self
[src]
pub fn top(self, value: impl Into<PostionLength>) -> Self
[src]
pub fn try_top(self, value: Option<impl Into<PostionLength>>) -> Self
[src]
pub fn right(self, value: impl Into<PostionLength>) -> Self
[src]
pub fn try_right(self, value: Option<impl Into<PostionLength>>) -> Self
[src]
pub fn bottom(self, value: impl Into<PostionLength>) -> Self
[src]
pub fn try_bottom(self, value: Option<impl Into<PostionLength>>) -> Self
[src]
pub fn z_index(self, value: impl Into<i32>) -> Self
[src]
pub fn try_z_index(self, value: Option<impl Into<i32>>) -> Self
[src]
pub fn clip(self, value: impl Into<Clip>) -> Self
[src]
pub fn try_clip(self, value: Option<impl Into<Clip>>) -> Self
[src]
impl Position
[src]
pub fn move_top(self) -> Self
[src]
pub fn move_right(self) -> Self
[src]
pub fn move_bottom(self) -> Self
[src]
pub fn move_left(self) -> Self
[src]
pub fn move_top_stretch(self) -> Self
[src]
pub fn move_right_stretch(self) -> Self
[src]
pub fn move_bottom_stretch(self) -> Self
[src]
pub fn move_left_stretch(self) -> Self
[src]
pub fn move_top_right(self) -> Self
[src]
pub fn move_top_left(self) -> Self
[src]
pub fn move_bottom_right(self) -> Self
[src]
pub fn move_bottom_left(self) -> Self
[src]
pub fn cover(self) -> Self
[src]
Trait Implementations
impl Clone for Position
[src]
impl Debug for Position
[src]
impl Default for Position
[src]
impl<T> From<T> for Position where
T: Into<PositionType>,
[src]
T: Into<PositionType>,
impl PartialEq<Position> for Position
[src]
impl StructuralPartialEq for Position
[src]
impl StyleUpdater for Position
[src]
fn update_style(self, style: Style) -> Style
[src]
Auto Trait Implementations
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
[src]
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
pub fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
pub fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
pub fn convert_into(self) -> U
[src]
pub fn convert_unclamped_into(self) -> U
[src]
pub fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,