Struct substrate::geometry::ring::RingBuilder
source · pub struct RingBuilder { /* private fields */ }
Expand description
A utility for constructing a Ring
.
Implementations§
source§impl RingBuilder
impl RingBuilder
sourcepub fn new() -> RingBuilder
pub fn new() -> RingBuilder
Creates a new RingBuilder
.
sourcepub fn outer(&mut self, rect: Rect) -> &mut RingBuilder
pub fn outer(&mut self, rect: Rect) -> &mut RingBuilder
Set the outer region of the ring.
Only one of inner and outer may be set.
sourcepub fn inner(&mut self, rect: Rect) -> &mut RingBuilder
pub fn inner(&mut self, rect: Rect) -> &mut RingBuilder
Set the inner region of the ring.
Only one of inner and outer may be set.
sourcepub fn left_width(&mut self, value: i64) -> &mut RingBuilder
pub fn left_width(&mut self, value: i64) -> &mut RingBuilder
Set the width of the left side of the ring.
sourcepub fn right_width(&mut self, value: i64) -> &mut RingBuilder
pub fn right_width(&mut self, value: i64) -> &mut RingBuilder
Set the width of the right side of the ring.
sourcepub fn bot_height(&mut self, value: i64) -> &mut RingBuilder
pub fn bot_height(&mut self, value: i64) -> &mut RingBuilder
Set the height of the bottom of the ring.
sourcepub fn top_height(&mut self, value: i64) -> &mut RingBuilder
pub fn top_height(&mut self, value: i64) -> &mut RingBuilder
Set the height of the top of the ring.
sourcepub fn widths(&mut self, value: i64) -> &mut RingBuilder
pub fn widths(&mut self, value: i64) -> &mut RingBuilder
Sets the widths of the vertical-going parts of the ring to the given value.
sourcepub fn heights(&mut self, value: i64) -> &mut RingBuilder
pub fn heights(&mut self, value: i64) -> &mut RingBuilder
Sets the heights of the horizontal-going parts of the ring to the given value.
sourcepub fn uniform_width(&mut self, value: i64) -> &mut RingBuilder
pub fn uniform_width(&mut self, value: i64) -> &mut RingBuilder
Sets the width of all ring edges to the given value.
sourcepub fn dir_widths(&mut self, dir: Dir, value: i64) -> &mut RingBuilder
pub fn dir_widths(&mut self, dir: Dir, value: i64) -> &mut RingBuilder
Sets the width of segments running in the given direction.
If dir
is Dir::Vert
, sets the widths of the left/right regions.
If dir
is Dir::Horiz
, sets the heights of the top/bottom regions.
sourcepub fn side_width(&mut self, side: Side, value: i64) -> &mut RingBuilder
pub fn side_width(&mut self, side: Side, value: i64) -> &mut RingBuilder
Set the width of the given side.
Trait Implementations§
source§impl Clone for RingBuilder
impl Clone for RingBuilder
source§fn clone(&self) -> RingBuilder
fn clone(&self) -> RingBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RingBuilder
impl Debug for RingBuilder
source§impl Default for RingBuilder
impl Default for RingBuilder
source§fn default() -> RingBuilder
fn default() -> RingBuilder
source§impl<'de> Deserialize<'de> for RingBuilder
impl<'de> Deserialize<'de> for RingBuilder
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<RingBuilder, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<RingBuilder, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl From<RingBuilder> for Ring
impl From<RingBuilder> for Ring
source§fn from(value: RingBuilder) -> Ring
fn from(value: RingBuilder) -> Ring
source§impl PartialEq for RingBuilder
impl PartialEq for RingBuilder
source§fn eq(&self, other: &RingBuilder) -> bool
fn eq(&self, other: &RingBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for RingBuilder
impl Serialize for RingBuilder
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for RingBuilder
impl Eq for RingBuilder
impl StructuralPartialEq for RingBuilder
Auto Trait Implementations§
impl RefUnwindSafe for RingBuilder
impl Send for RingBuilder
impl Sync for RingBuilder
impl Unpin for RingBuilder
impl UnwindSafe for RingBuilder
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
source§impl<T, U> CustomHardwareType<Flipped<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
impl<T, U> CustomHardwareType<Flipped<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
source§fn from_layout_type(other: &Flipped<T>) -> U
fn from_layout_type(other: &Flipped<T>) -> U
source§impl<T, U> CustomHardwareType<InOut<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
impl<T, U> CustomHardwareType<InOut<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
source§fn from_layout_type(other: &InOut<T>) -> U
fn from_layout_type(other: &InOut<T>) -> U
source§impl<T, U> CustomHardwareType<Input<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
impl<T, U> CustomHardwareType<Input<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
source§fn from_layout_type(other: &Input<T>) -> U
fn from_layout_type(other: &Input<T>) -> U
source§impl<T, U> CustomHardwareType<Output<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
impl<T, U> CustomHardwareType<Output<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
source§fn from_layout_type(other: &Output<T>) -> U
fn from_layout_type(other: &Output<T>) -> U
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request