pub struct Camera(/* private fields */);Expand description
Implementations§
Source§impl Camera
impl Camera
Sourcepub fn center_on(
self,
node: impl Into<Node>,
duration: impl Seconds,
) -> impl Future<Output = ()> + 'static
pub fn center_on( self, node: impl Into<Node>, duration: impl Seconds, ) -> impl Future<Output = ()> + 'static
Moves the camera so node’s center is in the middle of the frame.
Sourcepub fn fit(
self,
node: impl Into<Node>,
padding: f64,
duration: impl Seconds,
) -> impl Future<Output = ()> + 'static
pub fn fit( self, node: impl Into<Node>, padding: f64, duration: impl Seconds, ) -> impl Future<Output = ()> + 'static
Centers on node and zooms so all of it fits in the frame with
padding pixels to spare. Measures the node when called, so a layout
that is still growing fits at its current size.
Trait Implementations§
impl Copy for Camera
impl Eq for Camera
impl StructuralPartialEq for Camera
Auto Trait Implementations§
impl Freeze for Camera
impl RefUnwindSafe for Camera
impl Send for Camera
impl Sync for Camera
impl Unpin for Camera
impl UnsafeUnpin for Camera
impl UnwindSafe for Camera
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.