pub fn entity(&self) -> Option<&Collection> {
        match self.entity {
            Entity::Name(_) => None,
            Entity::Object(ref collection) => Some(collection),
        }
    }
/// Returns the `Collection` entity this `CollectionSession` operates with.
///
/// It returns `Some(&Collection)` if this session holds a loaded collection
/// entity or `None` otherwise.
///
/// If the collection entity is not loaded the `load()` function can be
/// used to get a session with a loaded collection entity.
Returns the `Collection` entity this `CollectionSession` operates with.
It returns `Some(&Collection)` if this session holds a loaded collection
entity or `None` otherwise.

If the collection entity is not loaded the `load()` function can be
used to get a session with a loaded collection entity.
Returns the ` Collection ` entity this ` CollectionSession ` operates with . It returns ` Some ( &Collection ) ` if this session holds a loaded collection entity or ` None ` otherwise . If the collection entity is not loaded the ` load () ` function can be used to get a session with a loaded collection entity .
pub fn entity(&self) -> Option<&Collection> {
        match self.entity {
            Entity::Name(_) => None,
            Entity::Object(ref collection) => Some(collection),
        }
    }
pub fn entity ( & self ) -> Option < & Collection > { match self . entity { Entity :: Name ( _ ) => None , Entity :: Object ( ref collection ) => Some ( collection ) , } }
Returns the `Collection` entity this `CollectionSession` operates with.
Returns the ` Collection ` entity this ` CollectionSession ` operates with .
&self
&self