[−][src]Struct cursive::view::Margins
Four values representing each direction.
Fields
left: usize
Left margin
right: usize
Right margin
top: usize
Top margin
bottom: usize
Bottom margin
Methods
impl Margins
[src]
pub fn new(left: usize, right: usize, top: usize, bottom: usize) -> Self
[src]
Creates a new Margins.
pub fn horizontal(&self) -> usize
[src]
Returns left + right.
pub fn vertical(&self) -> usize
[src]
Returns top + bottom.
pub fn combined(&self) -> Vec2
[src]
Returns (left+right, top+bottom).
pub fn top_left(&self) -> Vec2
[src]
Returns (left, top).
pub fn bot_right(&self) -> Vec2
[src]
Returns (right, bottom).
Trait Implementations
impl Clone for Margins
[src]
fn clone(&self) -> Margins
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<(usize, usize, usize, usize)> for Margins
[src]
impl From<(i32, i32, i32, i32)> for Margins
[src]
impl From<((i32, i32), (i32, i32))> for Margins
[src]
impl From<((usize, usize), (usize, usize))> for Margins
[src]
impl Copy for Margins
[src]
impl<T: Into<Margins>> Add<T> for Margins
[src]
type Output = Margins
The resulting type after applying the +
operator.
fn add(self, other: T) -> Margins
[src]
impl<T: Into<Margins>> Sub<T> for Margins
[src]
type Output = Margins
The resulting type after applying the -
operator.
fn sub(self, other: T) -> Margins
[src]
impl Mul<usize> for Margins
[src]
type Output = Margins
The resulting type after applying the *
operator.
fn mul(self, other: usize) -> Margins
[src]
impl Div<usize> for Margins
[src]
Auto Trait Implementations
impl Unpin for Margins
impl Sync for Margins
impl Send for Margins
impl UnwindSafe for Margins
impl RefUnwindSafe for Margins
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,